Show / Hide Table of Contents

Class SecurityTokenAdapter

A class that parses the jwt token, checks for the validity and can provide information of the jwt token.

Inheritance
object
SecurityTokenAdapter
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.Common.Auth
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class SecurityTokenAdapter

Constructors

SecurityTokenAdapter(string, ISessionKeySupplier)

Declaration
public SecurityTokenAdapter(string securityToken, ISessionKeySupplier sessionKeySupplier)
Parameters
Type Name Description
string securityToken
ISessionKeySupplier sessionKeySupplier

Fields

SecurityToken

Declaration
public readonly string SecurityToken
Field Value
Type Description
string

logger

Declaration
protected static Logger logger
Field Value
Type Description
Logger

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
Type Description
string

GetTokenValidDuration()

Return the total milliseconds the jwt token is valid for

Declaration
public double GetTokenValidDuration()
Returns
Type Description
double

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

In this article
Back to top