共用方式為


JwtTokenUtilities.CreateEncodedSignature Method

Definition

Overloads

CreateEncodedSignature(String, SigningCredentials)

Produces a signature over the input.

CreateEncodedSignature(String, SigningCredentials, Boolean)

Produces a signature over the input.

CreateEncodedSignature(String, SigningCredentials)

Produces a signature over the input.

public static string CreateEncodedSignature (string input, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials);
static member CreateEncodedSignature : string * Microsoft.IdentityModel.Tokens.SigningCredentials -> string
Public Shared Function CreateEncodedSignature (input As String, signingCredentials As SigningCredentials) As String

Parameters

input
String

String to be signed

signingCredentials
SigningCredentials

The SigningCredentials that contain crypto specs used to sign the token.

Returns

The base 64 url encoded signature over the bytes obtained from UTF8Encoding.GetBytes( 'input' ).

Exceptions

'input' or 'signingCredentials' is null.

Applies to

CreateEncodedSignature(String, SigningCredentials, Boolean)

Produces a signature over the input.

public static string CreateEncodedSignature (string input, Microsoft.IdentityModel.Tokens.SigningCredentials signingCredentials, bool cacheProvider);
static member CreateEncodedSignature : string * Microsoft.IdentityModel.Tokens.SigningCredentials * bool -> string
Public Shared Function CreateEncodedSignature (input As String, signingCredentials As SigningCredentials, cacheProvider As Boolean) As String

Parameters

input
String

String to be signed

signingCredentials
SigningCredentials

The SigningCredentials that contain crypto specs used to sign the token.

cacheProvider
Boolean

should the SignatureProvider be cached.

Returns

The base 64 url encoded signature over the bytes obtained from UTF8Encoding.GetBytes( 'input' ).

Exceptions

input or signingCredentials is null.

Applies to