Class SecurityTokenAdapter
A class that parses the jwt token, checks for the validity
and can provide information of the jwt token.
Inheritance
SecurityTokenAdapter
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class SecurityTokenAdapter
Constructors
SecurityTokenAdapter(string, ISessionKeySupplier)
Declaration
public SecurityTokenAdapter(string securityToken, ISessionKeySupplier sessionKeySupplier)
Parameters
Fields
SecurityToken
Declaration
public readonly string SecurityToken
Field Value
logger
Declaration
protected static Logger logger
Field Value
Methods
GetStringClaim(string)
Return a value for the given claim in the jwt token
Declaration
public string GetStringClaim(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
GetTokenValidDuration()
Return the total milliseconds the jwt token is valid for
Declaration
public double GetTokenValidDuration()
Returns
IsValid(double)
Checks to see if the current token is still valid
Copy and paste the token here: https://jwt.io/ to find keys and values
Declaration
public bool IsValid(double time = 0)
Parameters
Type |
Name |
Description |
double |
time |
|
Returns
Type |
Description |
bool |
true if valid
|