struct DppmRestApi::Config::User
- DppmRestApi::Config::User
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
config/user.crConstant Summary
-
API_KEY_SIZE =
63_u8
Constructors
- .new(api_key_hash : Scrypt::Password, group_ids : Set(Int32), name : String, id : UUID)
- .new(api_key_hash string : String, groups : Enumerable(Int32), name : String, id : UUID)
- .new(pull : JSON::PullParser)
Class Method Summary
- .create(groups : Set(Group), name : String) : Tuple(String, self)
- .create(groups : Set(Int), name : String) : Tuple(String, self)
- .deserialize(groups : String)
- .from_h(hash data : JWTCompatibleHash)
Instance Method Summary
- #api_key_hash : Scrypt::Password
- #api_key_hash=(api_key_hash)
- #group_ids : Set(Int32)
- #id : UUID
- #join_group(id : Int32)
- #leave_group(id : Int32)
- #name : String
- #name=(name)
- #to_h : JWTCompatibleHash
-
#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.
-
#to_json(builder : JSON::Builder, *, except : Symbol)
Build a JSON response, like JSON::Serializable, but allow certain variables to be excluded for this instance.
-
#to_pretty_s
Show a human-readable representation of the important information about a user.
Constructor Detail
def self.new(api_key_hash : Scrypt::Password, group_ids : Set(Int32), name : String, id : UUID)
#
def self.new(api_key_hash string : String, groups : Enumerable(Int32), name : String, id : UUID)
#
Class Method Detail
Instance Method Detail
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.
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.