Class: OauthIm::TokenDecoder

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

Constant Summary collapse

DEFAULT_DECODE_ALGORITHM =
'HS256'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, aud) ⇒ TokenDecoder

Returns a new instance of TokenDecoder.



11
12
13
14
# File 'app/services/oauth_im/token_decoder.rb', line 11

def initialize(token, aud)
  @token = token
  @aud = aud
end

Instance Attribute Details

#audObject (readonly)

Returns the value of attribute aud.



7
8
9
# File 'app/services/oauth_im/token_decoder.rb', line 7

def aud
  @aud
end

#tokenObject (readonly)

Returns the value of attribute token.



7
8
9
# File 'app/services/oauth_im/token_decoder.rb', line 7

def token
  @token
end

Instance Method Details

#decodeObject



16
17
18
# File 'app/services/oauth_im/token_decoder.rb', line 16

def decode
  decoded_token
end