IdentityTokenType
Members
Namespace: ASPSecurityKit
Assembly: ASPSecurityKit.dll
Summary
Defines the representation names of different identity token types which you can override with custom name if so required. Also provides methods to generate identity token urns (authUrns).
Members
APIKey
Summary
Indicates the name of identity token type API Key. The default is “apikey”.
UserSession
Summary
Indicates the name of identity token type user session. The default is “sessionid”.
Methods
MakeUrn(type,token)
Summary
Creates an identity token urn (authUrn) of the format [type]:[token]
.
Returns
An identity token urn of the format [type]:[token]
.
Parameters
Name | Type | Description |
---|---|---|
type | System.String | The token type. |
token | System.String | The token. |
MakeKey(key)
Summary
Creates an identity token urn (authUrn) for the specified API key.
Returns
An identity token urn for the specified API key.
Parameters
Name | Type | Description |
---|---|---|
key | System.String | The API key. |
MakeSession(id)
Summary
Creates an identity token urn (authUrn) for the specified user session id.
Returns
An identity token urn for the specified user session id.
Parameters
Name | Type | Description |
---|---|---|
id | System.String | The session id. |
GetToken(authUrn)
Summary
Gets the token from the specified identity token urn (authUrn).
Returns
The token.
Parameters
Name | Type | Description |
---|---|---|
authUrn | System.String | The identity token urn. |
GetTokenType(authUrn)
Summary
Gets the token type from the specified identity token urn (authUrn).
Returns
The token type.
Parameters
Name | Type | Description |
---|---|---|
authUrn | System.String | The identity token urn. |
IsKey(authUrn)
Summary
Determines whether the specified urn represents an API key identity token.
Returns
true
if the specified urn represents an API key identity token; otherwise, false
.
Parameters
Name | Type | Description |
---|---|---|
authUrn | System.String | The identity token urn. |
IsSession(authUrn)
Summary
Determines whether the specified urn represents a user session identity token.
Returns
true
if the specified urn represents a user session identity token; otherwise, false
.
Parameters
Name | Type | Description |
---|---|---|
authUrn | System.String | The identity token urn. |