Sha256: f6bf12ad05d3e5afb6012968148485fc753042d909871366884cbec1c884cc64
Contents?: true
Size: 908 Bytes
Versions: 72
Compression:
Stored size: 908 Bytes
Contents
module Rack module OAuth2 module Server module Abstract class Request < Rack::Request include AttrRequired, AttrOptional attr_required :client_id attr_optional :scope def initialize(env) super @client_id ||= params['client_id'] @scope = Array(params['scope'].to_s.split(' ')) end def attr_missing_with_error_handling! if params['client_id'].present? && @client_id != params['client_id'] invalid_request! 'Multiple client credentials are provided.' end attr_missing_without_error_handling! rescue AttrRequired::AttrMissing => e invalid_request! e.message, :state => @state, :redirect_uri => @redirect_uri end alias_method_chain :attr_missing!, :error_handling end end end end end
Version data entries
72 entries across 72 versions & 2 rubygems