Delegate for auth related operations.
More...
#include <common_types.h>
|
class | OAuth2Challenge |
| a class that contains all the information required from the calling application in order to generate an oauth2 token. More...
|
|
class | OAuth2Token |
| A class containing access token info provided by an application. More...
|
|
|
virtual bool | AcquireOAuth2Token (const Identity &identity, const OAuth2Challenge &challenge, OAuth2Token &token) |
| This method is called when an auth token is required for the policy engine with the given identity and the given challenge. The client should return whether acquiring token was successful. If successful, it should initialize the given token object.
|
|
virtual bool | AcquireOAuth2Token (const Identity &identity, const OAuth2Challenge &challenge, const std::shared_ptr< void > &context, OAuth2Token &token) |
| This method is called when an auth token is required for the policy engine with the given identity and the given challenge. The client should return whether acquiring token was successful. If successful, it should initialize the given token object.
|
|
Delegate for auth related operations.
◆ AcquireOAuth2Token() [1/2]
virtual bool AuthDelegate::AcquireOAuth2Token |
( |
const Identity & | identity, |
|
|
const OAuth2Challenge & | challenge, |
|
|
const std::shared_ptr< void > & | context, |
|
|
OAuth2Token & | token ) |
|
inlinevirtual |
This method is called when an auth token is required for the policy engine with the given identity and the given challenge. The client should return whether acquiring token was successful. If successful, it should initialize the given token object.
- Parameters
-
identity | User for whom a token is requested |
challenge | OAuth2 challenge |
context | Opaque context that was passed to the MIP API by the host application |
token | [Output] Base64-encoded OAuth2 token |
- Returns
- True if token successfully acquired, else false
- Note
- On failure, if token output parameter contains an error message, it will be included in the NoAuthTokenError exception that will later be raised to the application.
◆ AcquireOAuth2Token() [2/2]
This method is called when an auth token is required for the policy engine with the given identity and the given challenge. The client should return whether acquiring token was successful. If successful, it should initialize the given token object.
- Parameters
-
identity | User for whom a token is requested |
challenge | OAuth2 challenge |
token | [Output] Base64-encoded OAuth2 token |
- Returns
- True if token successfully acquired, else false
- Note
- On failure, if token output parameter contains an error message, it will be included in the NoAuthTokenError exception that will later be raised to the application.
- Deprecated
- This method will soon be deprecated in favor of the one accepting a context parameter. If the new version has been implemented, there is no need to implement this version.
The documentation for this class was generated from the following file: