C# Class RxWeb.Core.Security.JwtToken.JwtTokenProvider

Inheritance: IJwtTokenProvider
Show file Open project: rxweb/rxweb

Private Properties

Property Type Description
GetSymmetricKey string
LifetimeValidator bool

Public Methods

Method Description
JwtTokenProvider ( IDataProtectionProvider dataProtection, IHttpContextAccessor contextAccessor ) : Microsoft.AspNetCore.DataProtection
ValidateToken ( string securityKey, string jsonWebToken ) : ClaimsPrincipal
WriteToken ( IEnumerable claims, string issuer, string audience, DateTime expires ) : string>.KeyValuePair

Private Methods

Method Description
GetSymmetricKey ( ) : string
LifetimeValidator ( DateTime? notBefore, DateTime? expires, SecurityToken tokenToValidate, TokenValidationParameters @param ) : bool

Method Details

JwtTokenProvider() public method

public JwtTokenProvider ( IDataProtectionProvider dataProtection, IHttpContextAccessor contextAccessor ) : Microsoft.AspNetCore.DataProtection
dataProtection IDataProtectionProvider
contextAccessor IHttpContextAccessor
return Microsoft.AspNetCore.DataProtection

ValidateToken() public method

public ValidateToken ( string securityKey, string jsonWebToken ) : ClaimsPrincipal
securityKey string
jsonWebToken string
return ClaimsPrincipal

WriteToken() public method

public WriteToken ( IEnumerable claims, string issuer, string audience, DateTime expires ) : string>.KeyValuePair
claims IEnumerable
issuer string
audience string
expires DateTime
return string>.KeyValuePair