Class: AuthingRuby::Authentication::AuthenticationTokenProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/authing_ruby/authentication/AuthenticationTokenProvider.rb

Instance Method Summary collapse

Constructor Details

#initializeAuthenticationTokenProvider

Returns a new instance of AuthenticationTokenProvider.



9
10
11
12
# File 'lib/authing_ruby/authentication/AuthenticationTokenProvider.rb', line 9

def initialize()
  @token = nil
  @user = nil
end

Instance Method Details

#clearUserObject



35
36
37
38
# File 'lib/authing_ruby/authentication/AuthenticationTokenProvider.rb', line 35

def clearUser()
  @token = nil
  @user = nil
end

#getTokenObject



20
21
22
# File 'lib/authing_ruby/authentication/AuthenticationTokenProvider.rb', line 20

def getToken()
  return @token
end

#getUserObject



24
25
26
# File 'lib/authing_ruby/authentication/AuthenticationTokenProvider.rb', line 24

def getUser()
  return @user
end

#setToken(token = nil) ⇒ Object



14
15
16
17
18
# File 'lib/authing_ruby/authentication/AuthenticationTokenProvider.rb', line 14

def setToken(token = nil)
  if token
    @token = token
  end
end

#setUser(user = nil) ⇒ Object



28
29
30
31
32
33
# File 'lib/authing_ruby/authentication/AuthenticationTokenProvider.rb', line 28

def setUser(user = nil)
  if user
    @user = user
    @token = user['token']
  end
end