class Doorkeeper::OpenidConnect::Claims::Claim

Constants

STANDARD_CLAIMS

openid.net/specs/openid-connect-core-1_0.html#StandardClaims openid.net/specs/openid-connect-core-1_0.html#ScopeClaims

Attributes

name[RW]
response[RW]
scope[RW]

Public Class Methods

new(options = {}) click to toggle source
# File lib/doorkeeper/openid_connect/claims/claim.rb, line 19
def initialize(options = {})
  @name = options[:name].to_sym
  @response = Array.wrap(options[:response])
  @scope = options[:scope].to_sym if options[:scope]

  # use default scope for Standard Claims
  @scope ||= STANDARD_CLAIMS.find do |_scope, claims|
    claims.include? @name
  end.try(:first)

  # use profile scope as default fallback
  @scope ||= :profile
end