Class JwtBearerService
Service for creating Jwt tokens based on a claims identity.
Inheritance
object
JwtBearerService
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DataWeb.Identity
Assembly: DataWeb.Core.dll
Syntax
public class JwtBearerService : IJwtBearerService
Constructors
JwtBearerService(IConfigurationService)
Initializes a new instance of the JwtBearerService class with the specified configuration service.
Declaration
public JwtBearerService(IConfigurationService configurationService)
Parameters
Type | Name | Description |
---|---|---|
IConfigurationService | configurationService | The configuration service to use for getting app settings. |
Methods
GetTokenAsync(ClaimsIdentity)
Creates a Jwt token based on the specified claims identity.
Declaration
public Task<JwtSecurityToken> GetTokenAsync(ClaimsIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
ClaimsIdentity | identity | The claims identity to create the token from. |
Returns
Type | Description |
---|---|
Task<JwtSecurityToken> | A Jwt token. |