Method: Rack::PrxAuth::TokenData#initialize

Defined in:
lib/rack/prx_auth/token_data.rb

#initialize(attrs = {}) ⇒ TokenData

Returns a new instance of TokenData.



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rack/prx_auth/token_data.rb', line 8

def initialize(attrs = {})
  @attributes = attrs
  if attrs['aur']
    @authorized_resources = unpack_aur(attrs['aur']).freeze
  else
    @authorized_resources = {}.freeze
  end
  if attrs['scope']
    @scopes = attrs['scope'].split(' ').freeze
  else
    @scopes = [].freeze
  end
end