struct DppmRestApi::Config::User

Included Modules

Defined in:

config/user.cr

Constant Summary

API_KEY_SIZE = 63_u8

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(api_key_hash : Scrypt::Password, group_ids : Set(Int32), name : String, id : UUID) #

[View source]
def self.new(api_key_hash string : String, groups : Enumerable(Int32), name : String, id : UUID) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Class Method Detail

def self.create(groups : Set(Group), name : String) : Tuple(String, self) #

[View source]
def self.create(groups : Set(Int), name : String) : Tuple(String, self) #

[View source]
def self.deserialize(groups : String) #

[View source]
def self.from_h(hash data : JWTCompatibleHash) #

[View source]

Instance Method Detail

def api_key_hash : Scrypt::Password #

[View source]
def api_key_hash=(api_key_hash) #

[View source]
def group_ids : Set(Int32) #

[View source]
def id : UUID #

[View source]
def join_group(id : Int32) #

[View source]
def leave_group(id : Int32) #

[View source]
def name : String #

[View source]
def name=(name) #

[View source]
def to_h : JWTCompatibleHash #

[View source]
def to_json(builder : JSON::Builder, *, except : Enumerable(Symbol)) #

Build a JSON response, like JSON::Serializable, but allow certain variables to be excluded for this instance.


[View source]
def to_json(builder : JSON::Builder, *, except : Symbol) #

Build a JSON response, like JSON::Serializable, but allow certain variables to be excluded for this instance.


[View source]
def to_pretty_s #

Show a human-readable representation of the important information about a user.


[View source]