Virgil Security C++ SDK
|
Implementation of AccessTokenProviderInterface which provides AccessToken using callback. More...
#include <CallbackJwtProvider.h>
Public Member Functions | |
CallbackJwtProvider (std::function< std::future< std::string >(const TokenContext &)> getTokenCallback) | |
Constructor. More... | |
std::future< std::shared_ptr< interfaces::AccessTokenInterface > > | getToken (const TokenContext &tokenContext) |
Provides access token using callback. More... | |
const std::function< std::future< std::string >const TokenContext &)> & | getTokenCallback () const |
Getter. More... | |
Public Member Functions inherited from virgil::sdk::jwt::interfaces::AccessTokenProviderInterface | |
virtual | ~AccessTokenProviderInterface ()=default |
Virtual destructor. | |
Implementation of AccessTokenProviderInterface which provides AccessToken using callback.
virgil::sdk::jwt::providers::CallbackJwtProvider::CallbackJwtProvider | ( | std::function< std::future< std::string >(const TokenContext &)> | getTokenCallback | ) |
Constructor.
getTokenCallback | std::function, which takes a TokenContext returns std::future with Jwt std::string |
|
virtual |
Provides access token using callback.
tokenContext | TokenContext provides context explaining why token is needed |
Implements virgil::sdk::jwt::interfaces::AccessTokenProviderInterface.
const std::function<std::future<std::string>const TokenContext&)>& virgil::sdk::jwt::providers::CallbackJwtProvider::getTokenCallback | ( | ) | const |
Getter.