class N2y::TokenPair

Defined in:

n2y/token_pair.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(*, access : Nil | String = nil, refresh : Nil | String = nil) #

[View source]
def self.new(*, access : Nil | String = nil, refresh : Nil | String = nil, &on_change : TokenPair -> ) #

[View source]

Instance Method Detail

def access : String | Nil #

[View source]
def access=(access : String | Nil) #

[View source]
def access? : String | Nil | Nil #

[View source]
def invalidate #

Invalidate both tokens.


[View source]
def invalidate_access #

Invalidate access token.


[View source]
def invalidate_refresh #

Invalidate refresh token (also invalidates access).


[View source]
def on_change(&on_change : TokenPair -> ) #

[View source]
def refresh : String | Nil #

[View source]
def refresh=(refresh : String | Nil) #

[View source]
def refresh? : String | Nil | Nil #

[View source]
def usable? #

[View source]