Class AuthorizationHelper
Helper for working with the simplic cdn auth system (JWT)
Inheritance
System.Object
AuthorizationHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Framework.WebAPI
Assembly: Simplic.Framework.WebAPI.dll
Syntax
public static class AuthorizationHelper
Methods
| Improve this Doc View SourceCreatePrivateKey()
Create a new private key
Declaration
public static byte[] CreatePrivateKey()
Returns
Type | Description |
---|---|
System.Byte[] |
GenerateJWT(UserPrincipal)
Generate the JWT for an user principal
Declaration
public static string GenerateJWT(UserPrincipal userPrincipal)
Parameters
Type | Name | Description |
---|---|---|
UserPrincipal | userPrincipal | Principal instance |
Returns
Type | Description |
---|---|
System.String | JWT |
IsPrivateKeyExisting()
Check whether a private key is already existing
Declaration
public static bool IsPrivateKeyExisting()
Returns
Type | Description |
---|---|
System.Boolean |