Class: Concourse::Models::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/concourse/models/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parameters) ⇒ Token

Returns a new instance of Token.



8
9
10
11
12
13
# File 'lib/concourse/models/token.rb', line 8

def initialize(parameters)
  @access_token = parameters[:access_token]
  @token_type = parameters[:token_type]
  @expires_at = parameters[:expires_at]
  @id_token = parameters[:id_token]
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



6
7
8
# File 'lib/concourse/models/token.rb', line 6

def access_token
  @access_token
end

#expires_atObject (readonly)

Returns the value of attribute expires_at.



6
7
8
# File 'lib/concourse/models/token.rb', line 6

def expires_at
  @expires_at
end

#id_tokenObject (readonly)

Returns the value of attribute id_token.



6
7
8
# File 'lib/concourse/models/token.rb', line 6

def id_token
  @id_token
end

#token_typeObject (readonly)

Returns the value of attribute token_type.



6
7
8
# File 'lib/concourse/models/token.rb', line 6

def token_type
  @token_type
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'lib/concourse/models/token.rb', line 15

def ==(other)
  other.class == self.class && other.state == state
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/concourse/models/token.rb', line 19

def eql?(other)
  self == other
end

#hashObject



23
24
25
# File 'lib/concourse/models/token.rb', line 23

def hash
  state.hash
end