JsonWebTokenUtilityCreateSecurityToken Method |
Creates a Json Web Token (JWT) by given parameters (using a given security key.)
Namespace:
Hummingbird.TestFramework.Util
Assembly:
Hummingbird.TestFramework (in Hummingbird.TestFramework.dll) Version: 1.2.0.0
Syntax public static JwtSecurityToken CreateSecurityToken(
SecurityKey securityKey,
string algorithm,
JwtPayload payload,
out string token
)
Public Shared Function CreateSecurityToken (
securityKey As SecurityKey,
algorithm As String,
payload As JwtPayload,
<OutAttribute> ByRef token As String
) As JwtSecurityToken
public:
static JwtSecurityToken^ CreateSecurityToken(
SecurityKey^ securityKey,
String^ algorithm,
JwtPayload^ payload,
[OutAttribute] String^% token
)
static member CreateSecurityToken :
securityKey : SecurityKey *
algorithm : string *
payload : JwtPayload *
token : string byref -> JwtSecurityToken
Parameters
- securityKey
- Type: SecurityKey
An security key used to sign the token. The SecurityKey must compatible with selected algorithm. - algorithm
- Type: SystemString
The signature or encryption algorithm, choose one from SecurityAlgorithms. - payload
- Type: JwtPayload
The JWT payload. - token
- Type: SystemString
The string representation of the web token that can be used by the client.
Return Value
Type:
JwtSecurityTokenA Json Web Token generated with given parameters
See Also