lib/rack/oauth2/server/token/authorization_code.rb in rack-oauth2-0.0.1 vs lib/rack/oauth2/server/token/authorization_code.rb in rack-oauth2-0.0.2
- old
+ new
@@ -9,23 +9,19 @@
@response = Response.new(request)
super
end
class Request < Token::Request
- attr_accessor :code, :redirect_uri, :scope
+ attr_accessor :code
def initialize(env)
super
- @grant_type = 'authorization_code'
- @code = params['code']
- @redirect_uri = URI.parse(params['redirect_uri'])
- @scope = Array(params['scope'].to_s.split(' '))
- rescue URI::InvalidURIError
- raise BadRequest.new(:invalid_request, 'Invalid redirect_uri format.')
+ @grant_type = 'authorization_code'
+ @code = params['code']
end
def required_params
- super + [:code, :redirect_uri]
+ super + [:code]
end
end
class Response < Token::Response
end
\ No newline at end of file