Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
AuthDelegate Class Reference

Delegate for auth related operations. More...

#include <src/api/mip/common_types.h>

Classes

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...
 

Public Member Functions

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.
 
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.
 

Detailed Description

Delegate for auth related operations.

Definition at line 322 of file common_types.h.

Member Function Documentation

◆ 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
identityUser for whom a token is requested
challengeOAuth2 challenge
contextOpaque 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.

Definition at line 463 of file common_types.h.

467 {
468 // Temporarily call into old 'AcquireOAuth2Token' method until it is fully deprecated (in case application
469 // hasn't yet implemented this new method)
470 UNUSED(context);
471 return AcquireOAuth2Token(identity, challenge, token);
472 }
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 an...

References AcquireOAuth2Token().

◆ AcquireOAuth2Token() [2/2]

virtual bool AuthDelegate::AcquireOAuth2Token ( const Identity & identity,
const OAuth2Challenge & challenge,
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
identityUser for whom a token is requested
challengeOAuth2 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.

Definition at line 444 of file common_types.h.

447 { UNUSED(identity); UNUSED(challenge); UNUSED(token); return false; }

Referenced by AcquireOAuth2Token().


The documentation for this class was generated from the following file: