ProtocolUtils class
Class which provides helpers for OAuth 2.0 protocol specific values
Methods
| generate |
Generates the state value used by the common library. |
| parse |
Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user. |
| set |
Appends user state with random guid, or returns random guid. |
Method Details
generateLibraryState(ICrypto, Record<string, string>)
Generates the state value used by the common library.
static function generateLibraryState(cryptoObj: ICrypto, meta?: Record<string, string>): string
Parameters
- cryptoObj
- ICrypto
- meta
-
Record<string, string>
Returns
string
parseRequestState(ICrypto, string)
Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
static function parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject
Parameters
- cryptoObj
- ICrypto
- state
-
string
Returns
setRequestState(ICrypto, string, Record<string, string>)
Appends user state with random guid, or returns random guid.
static function setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record<string, string>): string
Parameters
- cryptoObj
- ICrypto
- userState
-
string
- meta
-
Record<string, string>
Returns
string