Class: Action::User::Signin

Inherits:
Object
  • Object
show all
Includes:
InchCI::Action
Defined in:
app/services/action/user/signin.rb

Constant Summary collapse

CLIENT_ID =
InchCI::AccessToken[:github_client_id]
CLIENT_SECRET =
InchCI::AccessToken[:github_secret]

Instance Method Summary collapse

Methods included from InchCI::Action

#exposures, included

Constructor Details

#initialize(request) ⇒ Signin

Returns a new instance of Signin.


13
14
15
16
17
18
# File 'app/services/action/user/signin.rb', line 13

def initialize(request)
  @user = find_or_create_user(request.env["omniauth.auth"])
  @new_user = @user..nil?
  @user. = Time.now
  InchCI::Store::SaveUser.call(@user)
end

Instance Method Details

#new_user?Boolean

Returns:

  • (Boolean)

20
21
22
# File 'app/services/action/user/signin.rb', line 20

def new_user?
  @new_user
end