struct PlaceOS::Model::UserJWT

Overview

TODO Migrate to human-readable attributes

Defined in:

placeos-models/user_jwt.cr

Constant Summary

ISSUER = "POS"

Constructors

Instance Method Summary

Instance methods inherited from struct PlaceOS::Model::JWTBase

encode(key : String | Nil = nil, algorithm : JWT::Algorithm = JWT::Algorithm::RS256) encode

Constructor methods inherited from struct PlaceOS::Model::JWTBase

new(pull : JSON::PullParser) new

Class methods inherited from struct PlaceOS::Model::JWTBase

decode(token : String, key : String | Nil = nil, algorithm : JWT::Algorithm = JWT::Algorithm::RS256, validate : Bool = true) decode

Constructor Detail

def self.new(iss : String, iat : Time, exp : Time, domain : String, id : String, user : PlaceOS::Model::UserJWT::Metadata, scope : Array(PlaceOS::Model::UserJWT::Scope) = [Scope::PUBLIC]) #

def self.new(pull : JSON::PullParser) #

TODO Migrate to human-readable attributes


Instance Method Detail

def aud : String #

DEPRECATED Use #domain instead.


def domain : String #

The authority's domain


def exp : Time #

def get_access(scope_name : String) : Scope::Access #

def guest_scope? #

def iat : Time #

def id : String #

The user's id


def is_admin?(*args, **options) #

def is_admin?(*args, **options, &) #

def is_support?(*args, **options) #

def is_support?(*args, **options, &) #

def iss : String #

def public_scope? #

def scope : Array(Scope) #

OAuth2 Scopes


def sub : String #

DEPRECATED Use #id instead.


def user : Metadata #