Sha256: e0b2632cc3f16d592d5bdb18e73f39142569386eab64f57bd008810c5907a35e
Contents?: true
Size: 791 Bytes
Versions: 46
Compression:
Stored size: 791 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! if params['client_id'].present? && @client_id != params['client_id'] invalid_request! 'Multiple client credentials are provided.' end super rescue AttrRequired::AttrMissing => e invalid_request! e.message, state: @state, redirect_uri: @redirect_uri end end end end end end
Version data entries
46 entries across 46 versions & 1 rubygems