Class: Layer::TokenCreatorService

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

Instance Method Summary collapse

Constructor Details

#initialize(login) ⇒ TokenCreatorService

Returns a new instance of TokenCreatorService.



2
3
4
# File 'app/services/layer/token_creator_service.rb', line 2

def initialize()
  @login = 
end

Instance Method Details

#tokenObject



6
7
8
9
10
11
# File 'app/services/layer/token_creator_service.rb', line 6

def token
  client = Layer::Client.authenticate do |nonce|
    Layer::IdentityToken.new(@login, nonce)
  end
  client.token
end