Show / Hide Table of Contents

Interface ITokenSecurity

JWT Security.

Namespace: ComponentSpace.OpenID.Security
Assembly: ComponentSpace.OpenID.dll
Syntax
public interface ITokenSecurity

Properties

ClientConfiguration

Gets or sets the client configuration.

Declaration
ClientConfiguration ClientConfiguration { get; set; }
Property Value
Type Description
ClientConfiguration

The client configuration.

ProviderConfiguration

Gets or sets the provider configuration.

Declaration
ProviderConfiguration ProviderConfiguration { get; set; }
Property Value
Type Description
ProviderConfiguration

The provider configuration.

Methods

CreateTokenAsync(SecurityTokenDescriptor)

Creates a token.

Declaration
Task<string> CreateTokenAsync(SecurityTokenDescriptor securityTokenDescriptor)
Parameters
Type Name Description
SecurityTokenDescriptor securityTokenDescriptor

The security token descriptor.

Returns
Type Description
Task<System.String>

A task that represents the operation and returns the token.

GetEncryptingCredentialsAsync()

Get the encrypting credentials.

Declaration
Task<EncryptingCredentials> GetEncryptingCredentialsAsync()
Returns
Type Description
Task<EncryptingCredentials>

A task that represents the operation and returns the encrypting credentials.

GetIssuerSigningKeysAsync(Boolean, Boolean)

Gets the issuer signing keys.

Declaration
Task<IList<SecurityKey>> GetIssuerSigningKeysAsync(bool includePublicKeys = false, bool includeSymmetricKeys = false)
Parameters
Type Name Description
System.Boolean includePublicKeys

The flag indicating whether to include asymmetric public keys.

System.Boolean includeSymmetricKeys

The flag indicating whether to include symmetric keys.

Returns
Type Description
Task<IList<SecurityKey>>

A task that represents the operation and returns the signing keys.

GetSigningCredentialsAsync()

Get the signing credentials.

Declaration
Task<SigningCredentials> GetSigningCredentialsAsync()
Returns
Type Description
Task<SigningCredentials>

A task that represents the operation and returns the signing credentials.

GetTokenDecryptionKeysAsync(Boolean, Boolean)

Gets the token decryption keys.

Declaration
Task<IList<SecurityKey>> GetTokenDecryptionKeysAsync(bool includePrivateKeys = false, bool includeSymmetricKeys = false)
Parameters
Type Name Description
System.Boolean includePrivateKeys

The flag indicating whether to include asymmetric private keys.

System.Boolean includeSymmetricKeys

The flag indicating whether to include symmetric keys.

Returns
Type Description
Task<IList<SecurityKey>>

A task that represents the operation and returns the decryption keys.

ReadToken(String)

Reads a token.

Declaration
JsonWebToken ReadToken(string token)
Parameters
Type Name Description
System.String token

The token string.

Returns
Type Description
JsonWebToken

The token.

ValidateTokenAsync(String, TokenValidationParameters)

Validates a token.

Declaration
Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters tokenValidationParameters)
Parameters
Type Name Description
System.String token

The token.

TokenValidationParameters tokenValidationParameters

The token validation parameters.

Returns
Type Description
Task<TokenValidationResult>

A task that represents the operation and returns the token validation result.

In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2022. All rights reserved.