JwtAuthProvider
Used to Issue and process JWT Tokens and registers ConvertSessionToToken Service to convert Sessions to JWT Tokens
Assembly: ServiceStack.dll
View Source
public class JwtAuthProvider : JwtAuthProviderReader, IAuthProvider, IAuthWithRequest, IAuthPlugin, IAuthResponseFilter
Properties
SetBearerTokenOnAuthenticateResponse
Whether to populate the Bearer Token in the AuthenticateResponse
View Source
public bool SetBearerTokenOnAuthenticateResponse { get; set; }
MaxProfileUrlSize
View Source
public static int MaxProfileUrlSize { get; set; }
Inherited Properties
AllowInFormData
Allow JWT in ss-tok=jwt HTML POST FormData. (default false)
View Source
public bool AllowInFormData { get; set; }
AllowInQueryString
Allow JWT in ?ss-tok=jwt QueryString. (default false)
View Source
public bool AllowInQueryString { get; set; }
Audience
The Audience to embed in the token. (default null)
View Source
public string Audience { get; set; }
Audiences
Embed Multiple Audiences in the token. (default none) A JWT is valid if it contains ANY audience in this List
View Source
public List<string> Audiences { get; set; }
AuthKey
The AuthKey used to sign the JWT Token
View Source
public byte[] AuthKey { get; set; }
AuthKeyBase64
View Source
public string AuthKeyBase64 { set; }
CreateHeaderFilter
Run custom filter after JWT Header is created
View Source
public Action<JsonObject, IAuthSession> CreateHeaderFilter { get; set; }
CreatePayloadFilter
Run custom filter after JWT Payload is created
View Source
public Action<JsonObject, IAuthSession> CreatePayloadFilter { get; set; }
EncryptPayload
Whether to encrypt JWE Payload (default false). Uses RSA-OAEP for Key Encryption and AES/128/CBC HMAC SHA256 for Content Encryption
View Source
public bool EncryptPayload { get; set; }
ExpireRefreshTokensIn
How long should JWT Refresh Tokens be valid for. (default 365 days)
View Source
public TimeSpan ExpireRefreshTokensIn { get; set; }
ExpireTokensIn
How long should JWT Tokens be valid for. (default 14 days)
View Source
public TimeSpan ExpireTokensIn { get; set; }
ExpireTokensInDays
Convenient overload to initialize ExpireTokensIn with an Integer
View Source
public int ExpireTokensInDays { set; }
FallbackAuthKeys
Allow verification using multiple Auth keys
View Source
public List<byte[]> FallbackAuthKeys { get; set; }
FallbackPrivateKeys
Allow verification using multiple private keys for JWE tokens
View Source
public List<RSAParameters> FallbackPrivateKeys { get; set; }
FallbackPublicKeys
Allow verification using multiple public keys
View Source
public List<RSAParameters> FallbackPublicKeys { get; set; }
HashAlgorithm
Which Hash Algorithm should be used to sign the JWT Token. (default HS256)
View Source
public string HashAlgorithm { get; set; }
IncludeJwtInConvertSessionToTokenResponse
Whether to also Include Token in ConvertSessionToTokenResponse
View Source
public bool IncludeJwtInConvertSessionToTokenResponse { get; set; }
InvalidateJwtIds
Invalidate JWTs with ids
View Source
public HashSet<string> InvalidateJwtIds { get; set; }
InvalidateRefreshTokensIssuedBefore
Whether to invalidate all JWT Refresh Tokens issued before a specified date.
View Source
public DateTime? InvalidateRefreshTokensIssuedBefore { get; set; }
InvalidateTokensIssuedBefore
Whether to invalidate all JWT Access Tokens issued before a specified date.
View Source
public DateTime? InvalidateTokensIssuedBefore { get; set; }
Issuer
The Issuer to embed in the token. (default ssjwt)
View Source
public string Issuer { get; set; }
KeyId
What Id to use to identify the Key used to sign the token. (default First 3 chars of Base64 Key)
View Source
public string KeyId { get; set; }
PopulateSessionFilter
Run custom filter after session is restored from a JWT Token
View Source
public Action<IAuthSession, JsonObject, IRequest> PopulateSessionFilter { get; set; }
PreValidateJwtPayloadFilter
Inspect or modify JWT Payload before validation, return error message if invalid else null
View Source
public Func<Dictionary<string, string>, string> PreValidateJwtPayloadFilter { get; set; }
PrivateKey
View Source
public RSAParameters? PrivateKey { get; set; }
PrivateKeyXml
Convenient overload to initialize the Private Key via exported XML
View Source
public string PrivateKeyXml { get; set; }
PublicKey
The RSA Public Key used to Verify the JWT Token when RSA is used
View Source
public RSAParameters? PublicKey { get; set; }
PublicKeyXml
Convenient overload to initialize the Public Key via exported XML
View Source
public string PublicKeyXml { get; set; }
RemoveInvalidTokenCookie
Whether to automatically remove expired or invalid cookies
View Source
public bool RemoveInvalidTokenCookie { get; set; }
RequireHashAlgorithm
Whether to only allow processing of JWT Tokens using the configured HashAlgorithm. (default true)
View Source
public bool RequireHashAlgorithm { get; set; }
RequiresAudience
Tokens must contain aud which is validated
View Source
public bool RequiresAudience { get; set; }
RequireSecureConnection
Whether to only allow access via API Key from a secure connection. (default true)
View Source
public bool RequireSecureConnection { get; set; }
ResolveJwtId
Change resolution for resolving unique jti id for Access Tokens
View Source
public Func<IRequest, string> ResolveJwtId { get; set; }
ResolveRefreshJwtId
Change resolution for resolving unique jti id for Refresh Tokens
View Source
public Func<IRequest, string> ResolveRefreshJwtId { get; set; }
ResolveUnixTime
Override conversion to Unix Time used in issuing JWTs and validation
View Source
public Func<DateTime, long> ResolveUnixTime { get; set; }
ServiceRoutes
Modify the registration of ConvertSessionToToken Service
View Source
public Dictionary<Type, string[]> ServiceRoutes { get; set; }
Type
View Source
public override string Type { get; }
UseTokenCookie
Whether to store JWTs in Cookies (ss-tok) for successful Authentications (default true)
View Source
public bool UseTokenCookie { get; set; }
ValidateRefreshToken
Allow custom logic to invalidate Refresh Tokens
View Source
public Func<JsonObject, IRequest, bool> ValidateRefreshToken { get; set; }
ValidateToken
Allow custom logic to invalidate JWT Tokens
View Source
public Func<JsonObject, IRequest, bool> ValidateToken { get; set; }
Methods
Init(IAppSettings)
View Source
public override void Init(IAppSettings appSettings = null)
Parameters
Type | Name |
---|---|
ServiceStack.Configuration.IAppSettings | appSettings |
ExecuteAsync(AuthFilterContext)
View Source
public async Task ExecuteAsync(AuthFilterContext authContext)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Auth.AuthFilterContext | authContext |
ResultFilterAsync(AuthResultContext, CancellationToken)
View Source
public async Task ResultFilterAsync(AuthResultContext authContext, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Auth.AuthResultContext | authContext |
System.Threading.CancellationToken | token |
GetHashAlgorithm()
View Source
public Func<byte[], byte[]> GetHashAlgorithm()
Returns
System.Func<System.Byte[],System.Byte[]>
GetHashAlgorithm(IRequest)
View Source
public Func<byte[], byte[]> GetHashAlgorithm(IRequest req)
Returns
System.Func<System.Byte[],System.Byte[]>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
CreateJwtBearerToken(IAuthSession, IEnumerable<String>, IEnumerable<String>)
View Source
public string CreateJwtBearerToken(IAuthSession session, IEnumerable<string> roles = null, IEnumerable<string> perms = null)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
System.Collections.Generic.IEnumerable<System.String> | roles |
System.Collections.Generic.IEnumerable<System.String> | perms |
CreateJwtBearerToken(IRequest, IAuthSession, IEnumerable<String>, IEnumerable<String>)
View Source
public string CreateJwtBearerToken(IRequest req, IAuthSession session, IEnumerable<string> roles = null, IEnumerable<string> perms = null)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Auth.IAuthSession | session |
System.Collections.Generic.IEnumerable<System.String> | roles |
System.Collections.Generic.IEnumerable<System.String> | perms |
CreateJwtRefreshToken(String, TimeSpan)
View Source
public string CreateJwtRefreshToken(string userId, TimeSpan expireRefreshTokenIn)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | userId |
System.TimeSpan | expireRefreshTokenIn |
CreateJwtRefreshToken(IRequest, String, TimeSpan)
View Source
public string CreateJwtRefreshToken(IRequest req, string userId, TimeSpan expireRefreshTokenIn)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String | userId |
System.TimeSpan | expireRefreshTokenIn |
EnableRefreshToken()
View Source
protected virtual bool EnableRefreshToken()
Returns
System.Boolean
CreateEncryptedJweToken(JsonObject, RSAParameters)
View Source
public static string CreateEncryptedJweToken(JsonObject jwtPayload, RSAParameters publicKey)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
System.Security.Cryptography.RSAParameters | publicKey |
CreateJwt(JsonObject, JsonObject, Func<Byte[], Byte[]>)
View Source
public static string CreateJwt(JsonObject jwtHeader, JsonObject jwtPayload, Func<byte[], byte[]> signData)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtHeader |
ServiceStack.Text.JsonObject | jwtPayload |
System.Func<System.Byte[],System.Byte[]> | signData |
CreateJwtHeader(String, String)
View Source
public static JsonObject CreateJwtHeader(string algorithm, string keyId = null)
Returns
Parameters
Type | Name |
---|---|
System.String | algorithm |
System.String | keyId |
CreateJwtPayload(IAuthSession, String, TimeSpan, IEnumerable<String>, IEnumerable<String>, IEnumerable<String>)
View Source
public static JsonObject CreateJwtPayload(IAuthSession session, string issuer, TimeSpan expireIn, IEnumerable<string> audiences = null, IEnumerable<string> roles = null, IEnumerable<string> permissions = null)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
System.String | issuer |
System.TimeSpan | expireIn |
System.Collections.Generic.IEnumerable<System.String> | audiences |
System.Collections.Generic.IEnumerable<System.String> | roles |
System.Collections.Generic.IEnumerable<System.String> | permissions |
Dump(String)
Dump contents of JWT
View Source
public static string Dump(string jwt)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | jwt |
PrintDump(String)
Print Dump contents of JWT to Console
View Source
public static void PrintDump(string jwt)
Parameters
Type | Name |
---|---|
System.String | jwt |
CreateAccessTokenFromRefreshToken(String, IRequest)
View Source
public override async Task<string> CreateAccessTokenFromRefreshToken(string refreshToken, IRequest req)
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | refreshToken |
ServiceStack.Web.IRequest | req |
Inherited Methods
AssertJwtPayloadIsValid(JsonObject)
View Source
public void AssertJwtPayloadIsValid(JsonObject jwtPayload)
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
AssertRefreshJwtPayloadIsValid(JsonObject)
View Source
public void AssertRefreshJwtPayloadIsValid(JsonObject jwtPayload)
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
AuthenticateAsync(IServiceBase, IAuthSession, Authenticate, CancellationToken)
View Source
public override Task<object> AuthenticateAsync(IServiceBase authService, IAuthSession session, Authenticate request, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Object>
Parameters
Type | Name |
---|---|
ServiceStack.IServiceBase | authService |
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Authenticate | request |
System.Threading.CancellationToken | token |
AuthenticateBearerToken(IRequest, IResponse, String)
View Source
protected virtual bool AuthenticateBearerToken(IRequest req, IResponse res, string bearerToken)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Web.IResponse | res |
System.String | bearerToken |
AuthenticateRefreshToken(IRequest, IResponse, String)
View Source
protected virtual async Task<bool> AuthenticateRefreshToken(IRequest req, IResponse res, string refreshToken)
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Web.IResponse | res |
System.String | refreshToken |
AuthenticateResponseDecorator(AuthFilterContext)
View Source
public object AuthenticateResponseDecorator(AuthFilterContext ctx)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.Auth.AuthFilterContext | ctx |
ConvertJwtToSession(IRequest, String)
View Source
public virtual IAuthSession ConvertJwtToSession(IRequest req, string jwt)
Returns
ServiceStack.Auth.IAuthSession
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String | jwt |
CreateAccessTokenFromRefreshToken(String, IRequest)
View Source
public virtual Task<string> CreateAccessTokenFromRefreshToken(string refreshToken, IRequest req)
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | refreshToken |
ServiceStack.Web.IRequest | req |
CreateSessionFromJwt(IRequest)
View Source
public static IAuthSession CreateSessionFromJwt(IRequest req)
Returns
ServiceStack.Auth.IAuthSession
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
CreateSessionFromPayload(IRequest, JsonObject)
View Source
public virtual IAuthSession CreateSessionFromPayload(IRequest req, JsonObject jwtPayload)
Returns
ServiceStack.Auth.IAuthSession
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Text.JsonObject | jwtPayload |
DefaultResolveUnixTime(DateTime)
View Source
public static long DefaultResolveUnixTime(DateTime dateTime)
Returns
System.Int64
Parameters
Type | Name |
---|---|
System.DateTime | dateTime |
Dump(String)
View Source
public static string Dump(string jwt)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | jwt |
ExtractHeader(String)
View Source
public static Dictionary<string, object> ExtractHeader(string jwt)
Returns
System.Collections.Generic.Dictionary<System.String,System.Object>
Parameters
Type | Name |
---|---|
System.String | jwt |
ExtractPayload(String)
View Source
public static Dictionary<string, object> ExtractPayload(string jwt)
Returns
System.Collections.Generic.Dictionary<System.String,System.Object>
Parameters
Type | Name |
---|---|
System.String | jwt |
GetAuthKey(IRequest)
View Source
public byte[] GetAuthKey(IRequest req = null)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetFallbackAuthKeys(IRequest)
View Source
public List<byte[]> GetFallbackAuthKeys(IRequest req = null)
Returns
System.Collections.Generic.List<System.Byte[]>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetFallbackPrivateKeys(IRequest)
View Source
public List<RSAParameters> GetFallbackPrivateKeys(IRequest req = null)
Returns
System.Collections.Generic.List<System.Security.Cryptography.RSAParameters>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetFallbackPublicKeys(IRequest)
View Source
public List<RSAParameters> GetFallbackPublicKeys(IRequest req = null)
Returns
System.Collections.Generic.List<System.Security.Cryptography.RSAParameters>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetInvalidJwtPayloadError(JsonObject)
View Source
public virtual string GetInvalidJwtPayloadError(JsonObject jwtPayload)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
GetInvalidRefreshJwtPayloadError(JsonObject)
View Source
public virtual string GetInvalidRefreshJwtPayloadError(JsonObject jwtPayload)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
GetKeyId(IRequest)
View Source
public virtual string GetKeyId(IRequest req)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetPrivateKey(IRequest)
View Source
public RSAParameters? GetPrivateKey(IRequest req = null)
Returns
System.Nullable<System.Security.Cryptography.RSAParameters>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetPublicKey(IRequest)
View Source
public RSAParameters? GetPublicKey(IRequest req = null)
Returns
System.Nullable<System.Security.Cryptography.RSAParameters>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetUnixTime(Dictionary<String, String>, String)
View Source
public static long? GetUnixTime(Dictionary<string, string> jwtPayload, string key)
Returns
System.Nullable<System.Int64>
Parameters
Type | Name |
---|---|
System.Collections.Generic.Dictionary<System.String,System.String> | jwtPayload |
System.String | key |
GetValidJwtPayload(IRequest)
Return token payload which is both verified and still valid
View Source
public virtual JsonObject GetValidJwtPayload(IRequest req)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
GetValidJwtPayload(IRequest, String)
Return token payload which is both verified and still valid
View Source
public virtual JsonObject GetValidJwtPayload(IRequest req, string jwt)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String | jwt |
GetValidJwtPayload(String)
View Source
public JsonObject GetValidJwtPayload(string jwt)
Returns
Parameters
Type | Name |
---|---|
System.String | jwt |
GetVerifiedJwePayload(IRequest, String[])
Return token payload which has been verified to be created using the configured encryption key. Use GetValidJwePayload() instead if you also want the payload validated.
View Source
public virtual JsonObject GetVerifiedJwePayload(IRequest req, string[] parts)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String[] | parts |
GetVerifiedJwePayload(String)
Return token payload which has been verified to be created using the configured encryption key. Use GetValidJwtPayload() instead if you also want the payload validated.
View Source
public virtual JsonObject GetVerifiedJwePayload(string jwt)
Returns
Parameters
Type | Name |
---|---|
System.String | jwt |
GetVerifiedJwtPayload(IRequest, String[])
Return token payload which has been verified to be created using the configured encryption key. Use GetValidJwtPayload() instead if you also want the payload validated.
View Source
public virtual JsonObject GetVerifiedJwtPayload(IRequest req, string[] parts)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String[] | parts |
GetVerifiedJwtPayload(String)
Return token payload which has been verified to be created using the configured encryption key. Use GetValidJwtPayload() instead if you also want the payload validated.
View Source
public virtual JsonObject GetVerifiedJwtPayload(string jwt)
Returns
Parameters
Type | Name |
---|---|
System.String | jwt |
HasBeenInvalidated(JsonObject, Int64)
View Source
public virtual bool HasBeenInvalidated(JsonObject jwtPayload, long unixTime)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
System.Int64 | unixTime |
HasExpired(JsonObject)
View Source
public virtual bool HasExpired(JsonObject jwtPayload)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
HasInvalidatedId(JsonObject)
View Source
public virtual bool HasInvalidatedId(JsonObject jwtPayload)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
HasInvalidAudience(JsonObject, out String)
View Source
public virtual bool HasInvalidAudience(JsonObject jwtPayload, out string audience)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
System.String | audience |
HasInvalidNotBefore(JsonObject)
View Source
public virtual bool HasInvalidNotBefore(JsonObject jwtPayload)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Text.JsonObject | jwtPayload |
Init(IAppSettings)
View Source
public virtual void Init(IAppSettings appSettings = null)
Parameters
Type | Name |
---|---|
ServiceStack.Configuration.IAppSettings | appSettings |
IsAuthorized(IAuthSession, IAuthTokens, Authenticate)
View Source
public override bool IsAuthorized(IAuthSession session, IAuthTokens tokens, Authenticate request = null)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Auth.IAuthSession | session |
ServiceStack.Auth.IAuthTokens | tokens |
ServiceStack.Authenticate | request |
IsJwtValid(IRequest)
View Source
public bool IsJwtValid(IRequest req)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
IsJwtValid(IRequest, String)
View Source
public bool IsJwtValid(IRequest req, string jwt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String | jwt |
IsJwtValid(String)
View Source
public bool IsJwtValid(string jwt)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | jwt |
LastJwtId()
Get the last jti AutoId generated
View Source
public string LastJwtId()
Returns
System.String
LastRefreshJwtId()
View Source
public string LastRefreshJwtId()
Returns
System.String
NextJwtId()
Get the next AutoId for usage in jti JWT Access Tokens
View Source
public string NextJwtId()
Returns
System.String
NextRefreshJwtId()
Get the next AutoId for usage in jti JWT Refresh Tokens
View Source
public string NextRefreshJwtId()
Returns
System.String
PreAuthenticateAsync(IRequest, IResponse)
View Source
public async Task PreAuthenticateAsync(IRequest req, IResponse res)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
ServiceStack.Web.IResponse | res |
Register(IAppHost, AuthFeature)
View Source
public override void Register(IAppHost appHost, AuthFeature feature)
Parameters
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
ServiceStack.AuthFeature | feature |
RegisterResponseDecorator(RegisterFilterContext)
View Source
public object RegisterResponseDecorator(RegisterFilterContext ctx)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.Auth.RegisterFilterContext | ctx |
VerifyJwePayload(IRequest, String[], out Byte[], out Byte[], out Byte[])
View Source
public virtual bool VerifyJwePayload(IRequest req, string[] parts, out byte[] iv, out byte[] cipherText, out byte[] cryptKey)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String[] | parts |
System.Byte[] | iv |
System.Byte[] | cipherText |
System.Byte[] | cryptKey |
VerifyPayload(IRequest, String, Byte[], Byte[])
View Source
public virtual bool VerifyPayload(IRequest req, string algorithm, byte[] bytesToSign, byte[] sentSignatureBytes)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | req |
System.String | algorithm |
System.Byte[] | bytesToSign |
System.Byte[] | sentSignatureBytes |