class Doorkeeper::OAuth::ClientCredentialsRequest::Validation
def initialize(server, request)
def initialize(server, request) @server = server @request = request @client = request.client validate end
def validate_client
def validate_client @client.present? end
def validate_scopes
def validate_scopes return true if @request.scopes.blank? application_scopes = if @client.present? @client.application.scopes else "" end ScopeChecker.valid?( scope_str: @request.scopes.to_s, server_scopes: @server.scopes, app_scopes: application_scopes, grant_type: Doorkeeper::OAuth::CLIENT_CREDENTIALS ) end