Interface ITokenService
- Namespace
- adas_core.Authentication.Interfaces
- Assembly
- adas-core.Authentication.dll
public interface ITokenService
- Extension Methods
Properties
RefreshTokenValidityInDays
int RefreshTokenValidityInDays { get; }
Property Value
Methods
GetRefreshToken()
Retrieves the current refresh token used to obtain new access tokens for authentication.
string GetRefreshToken()
Returns
- string
The refresh token as a string.
GetToken(string, List<Claim>)
Retrieves a SecurityToken associated with the specified username and claims. Returns null when no matching token is found.
SecurityToken? GetToken(string username, List<Claim> claims)
Parameters
usernamestringThe username used to look up the security token.
claimsList<Claim>The list of claims associated with the token.
Returns
- SecurityToken
A SecurityToken if a matching token is found; otherwise, null.
Serialize(SecurityToken)
Serializes the specified security token into its string representation.
string Serialize(SecurityToken token)
Parameters
tokenSecurityTokenThe security token to serialize.
Returns
- string
A string containing the serialized form of the security token.