Laspatule::Services::Users
Inherits Reference < Object
Constructors
new(repository : Repositories::Users, mail : Mail)
SourceInstance methods
auth(email : String, password : String) : Models::User | Nil
Authenticates a user and returns its.
If the authentication fails, return nil.
create(user : Models::CreateUser) : Nil
Create a new user.
Create the user, then send their an email to activate its account.
create_access_token(user : Models::User) : String
Creates a new access token for this user and returns it.
get_by_access_token?(access_token : String) : Models::User | Nil
Gets a user by its access token.