class

Wgctl::Server::Auth::TokenStore

Inherits Reference < Object

Constructors

new(path : String = TokenStore.default_path)
Source

Class methods

default_path
Source

Instance methods

authenticate(raw_token : String) : Token | Nil

Authenticates a raw token against the store, returns Token if valid

Source
create(name : String, duration : Time::Span | Nil = nil) : Tuple(Token, String)

Creates a new token, saves store, and returns {Token, raw_token_string}

Source
list

Returns all tokens

Source
load
Source
path
Source
path=(path : String)
Source
revoke(id_or_name : String) : Bool

Revokes a token by id or name

Source
save
Source
tokens
Source