class

Laspatule::Services::Users

Inherits Reference < Object

Constructors

new(repository : Repositories::Users, mail : Mail)
Source

Instance methods

auth(email : String, password : String) : Models::User | Nil

Authenticates a user and returns its.

If the authentication fails, return nil.

Source
create(user : Models::CreateUser) : Nil

Create a new user.

Create the user, then send their an email to activate its account.

Source
create_access_token(user : Models::User) : String

Creates a new access token for this user and returns it.

Source
get_by_access_token?(access_token : String) : Models::User | Nil

Gets a user by its access token.

Source