Table of Contents

Interface IJwtEncoder

Namespace
JWT
Assembly
Coherence.JWT.dll

Represents a JWT encoder.

public interface IJwtEncoder
Extension Methods

Methods

Encode(IDictionary<string, object>, object, byte[])

Creates a JWT given a header, a payload, the signing key, and the algorithm to use.

string Encode(IDictionary<string, object> extraHeaders, object payload, byte[] key)

Parameters

extraHeaders IDictionary<string, object>

An arbitrary set of extra headers. Will be augmented with the standard "typ" and "alg" headers

payload object

An arbitrary payload (must be serializable to JSON)

key byte[]

The key bytes used to sign the token

Returns

string

The generated JWT