Table of Contents

Class JEToken

Namespace: CmlLib.Core.Auth.Microsoft.Sessions
Assembly: CmlLib.Core.Auth.Microsoft.dll

public class JEToken

Inheritance

objectJEToken

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

AccessToken

[JsonPropertyName("access_token")]
public string? AccessToken { get; set; }

Property Value

string?

ExpiresIn

[JsonPropertyName("expires_in")]
public int ExpiresIn { get; set; }

Property Value

int

ExpiresOn

[JsonPropertyName("expires_on")]
public DateTime ExpiresOn { get; set; }

Property Value

DateTime

Roles

[JsonPropertyName("roles")]
public string[]? Roles { get; set; }

Property Value

string[]?

TokenType

[JsonPropertyName("token_type")]
public string? TokenType { get; set; }

Property Value

string?

Username

[JsonPropertyName("username")]
public string? Username { get; set; }

Property Value

string?

Methods

DecodeAccesTokenPayload()

decode jwt payload of AccessToken

public MojangXboxAccessTokenPayload? DecodeAccesTokenPayload()

Returns

MojangXboxAccessTokenPayload?

Exceptions

InvalidOperationException

AccessToken is null or empty

FormatException

AccessToken is not valid jwt

ToString()

public override string ToString()

Returns

string

Validate()

check if access token is valid

public bool Validate()

Returns

bool

validation result