Sha256: 1d463dc077fdb2d4ec6564e1275c411ddd616dd5a4b3bcafa7b235ebc00f344a
Contents?: true
Size: 810 Bytes
Versions: 23
Compression:
Stored size: 810 Bytes
Contents
require 'doorkeeper/validations' require 'doorkeeper/oauth/scopes' require 'doorkeeper/oauth/helpers/scope_checker' module Doorkeeper module OAuth class ClientCredentialsRequest class Validation include Doorkeeper::Validations include Doorkeeper::OAuth::Helpers validate :client, :error => :invalid_client validate :scopes, :error => :invalid_scope def initialize(server, request) @server, @request = server, request validate end private def validate_client @request.client.present? end def validate_scopes return true unless @request.original_scopes.present? ScopeChecker.valid?(@request.original_scopes, @server.scopes) end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems