Table of Contents

Method CreateToken

Namespace
Zedal.Sdk.Jwt
Assembly
Zedal.Sdk.dll

CreateToken<T>(byte[])

Creates the token from its JWT byte array representation.

public static T CreateToken<T>(byte[] byteArray)

Parameters

byteArray byte[]

byte array of the JWT.

Returns

T

Token.

Type Parameters

T

TokenType T.

Exceptions

ArgumentException

if jwtAsString cannot be assigned to a token type.

CreateToken<T>(string)

Creates a token from its JWT string with the chosen TokenType T This method is obsolete and will be removed in future versions. Please use the byte[]-based method instead for better security and flexibility.

[Obsolete("This method is deprecated. Use the byte[] version instead.")]
public static T CreateToken<T>(string jwtAsString)

Parameters

jwtAsString string

string representation of the JWT.

Returns

T

Token.

Type Parameters

T

TokenType T.

Exceptions

ArgumentException

if jwtAsString cannot be assigned to a token type.

CreateToken(byte[])

Creates the token from its JWT byte array representation.

public static JwtWrapper CreateToken(byte[] byteArray)

Parameters

byteArray byte[]

byte array of the JWT.

Returns

JwtWrapper