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.



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

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.



4
5
6
# File 'lib/concourse/models/token.rb', line 4

def access_token
  @access_token
end

#expires_atObject (readonly)

Returns the value of attribute expires_at.



4
5
6
# File 'lib/concourse/models/token.rb', line 4

def expires_at
  @expires_at
end

#id_tokenObject (readonly)

Returns the value of attribute id_token.



4
5
6
# File 'lib/concourse/models/token.rb', line 4

def id_token
  @id_token
end

#token_typeObject (readonly)

Returns the value of attribute token_type.



4
5
6
# File 'lib/concourse/models/token.rb', line 4

def token_type
  @token_type
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/concourse/models/token.rb', line 13

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/concourse/models/token.rb', line 17

def eql?(other)
  self == other
end

#hashObject



21
22
23
# File 'lib/concourse/models/token.rb', line 21

def hash
  state.hash
end