Class AuthenticationTokenHelper<TAuthenticationToken>
A helper for setting and retrieving authentication tokens of type TAuthenticationToken
Inheritance
System.Object
AuthenticationTokenHelper<TAuthenticationToken>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.Authentication
Assembly: Cqrs.dll
Syntax
public class AuthenticationTokenHelper<TAuthenticationToken> : IAuthenticationTokenHelper<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of authentication token. |
Constructors
AuthenticationTokenHelper(IContextItemCollectionFactory)
Instantiate a new instance of AuthenticationTokenHelper<TAuthenticationToken>
Declaration
public AuthenticationTokenHelper(IContextItemCollectionFactory factory)
Parameters
Type | Name | Description |
---|---|---|
cdmdotnet.StateManagement.IContextItemCollectionFactory | factory |
Fields
CacheKey
The key used to store the authentication token in the Cache.
Declaration
protected string CacheKey
Field Value
Type | Description |
---|---|
System.String |
Properties
Cache
Get or set the Cache.
Declaration
protected IContextItemCollection Cache { get; }
Property Value
Type | Description |
---|---|
cdmdotnet.StateManagement.IContextItemCollection |
Methods
GetAuthenticationToken()
Get the current TAuthenticationToken
for the current context/request.
Declaration
public TAuthenticationToken GetAuthenticationToken()
Returns
Type | Description |
---|---|
TAuthenticationToken |
Implements
SetAuthenticationToken(TAuthenticationToken)
Set the provided token
for the current context/request.
Declaration
public TAuthenticationToken SetAuthenticationToken(TAuthenticationToken token)
Parameters
Type | Name | Description |
---|---|---|
TAuthenticationToken | token |
Returns
Type | Description |
---|---|
TAuthenticationToken |