struct PlaceOS::Model::UserJWT
- PlaceOS::Model::UserJWT
- PlaceOS::Model::JWTBase
- Struct
- Value
- Object
Overview
TODO Migrate to human-readable attributes
Defined in:
placeos-models/user_jwt.crConstant Summary
-
ISSUER =
"POS"
Constructors
- .new(iss : String, iat : Time, exp : Time, domain : String, id : String, user : PlaceOS::Model::UserJWT::Metadata, scope : Array(PlaceOS::Model::UserJWT::Scope) = [Scope::PUBLIC])
-
.new(pull : JSON::PullParser)
TODO Migrate to human-readable attributes
Instance Method Summary
-
#aud : String
DEPRECATED Use #domain instead.
-
#domain : String
The authority's domain
- #exp : Time
- #get_access(scope_name : String) : Scope::Access
- #guest_scope?
- #iat : Time
-
#id : String
The user's id
- #is_admin?(*args, **options)
- #is_admin?(*args, **options, &)
- #is_support?(*args, **options)
- #is_support?(*args, **options, &)
- #iss : String
- #public_scope?
-
#scope : Array(Scope)
OAuth2 Scopes
-
#sub : String
DEPRECATED Use #id instead.
- #user : Metadata
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])
#