Class: Aikido::Zen::Request::Schema::AuthDiscovery

Inherits:
Object
  • Object
show all
Defined in:
lib/aikido/zen/request/schema/auth_discovery.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ AuthDiscovery

Returns a new instance of AuthDiscovery.



8
9
10
# File 'lib/aikido/zen/request/schema/auth_discovery.rb', line 8

def initialize(context)
  @context = context
end

Instance Method Details

#schemasObject



12
13
14
15
16
17
18
19
# File 'lib/aikido/zen/request/schema/auth_discovery.rb', line 12

def schemas
  schemas = []
  schemas << extract_from_authorization_header if headers["Authorization"]
  schemas.concat(extract_from_headers)
  schemas.concat(extract_from_cookies)

  AuthSchemas.new(schemas)
end