Class: BaseAuthenticator

Inherits:
Object
  • Object
show all
Defined in:
app/services/base_authenticator.rb

Defined Under Namespace

Classes: ApiError

Instance Method Summary collapse

Constructor Details

#initialize(auth_code) ⇒ BaseAuthenticator

Returns a new instance of BaseAuthenticator.



5
6
7
# File 'app/services/base_authenticator.rb', line 5

def initialize(auth_code)
  @auth_code = auth_code
end

Instance Method Details

#authenticate!Object



9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/services/base_authenticator.rb', line 9

def authenticate!
  user = get_user(access_token)
   = (user)

  if .present?
    (, user)
  else
     = (user)
  end

  
end