module PlaceOS::Api::Utils::CurrentUser

Defined in:

placeos-rest-api/utilities/current-user.cr

Instance Method Summary

Instance Method Detail

def authorize! : Model::UserJWT #

[View source]
def check_admin #

Read admin status from supplied request JWT


[View source]
def check_oauth_scope #

[View source]
def check_support #

Read support status from supplied request JWT


[View source]
def current_authority : Model::Authority | Nil #

Obtains the authority for the request's host


[View source]
def current_user : Model::User #

Obtains user referenced by user_token id


[View source]
def is_admin? #

[View source]
def is_support? #

[View source]
def user_token : Model::UserJWT #

Getter for user_token


[View source]