Sha256: e0c9e84c5859412d920f4478f648e021c5355cbc30e4650ecb45e38c7f930763
Contents?: true
Size: 897 Bytes
Versions: 23
Compression:
Stored size: 897 Bytes
Contents
require 'doorkeeper/oauth/client_credentials/creator' require 'doorkeeper/oauth/client_credentials/issuer' require 'doorkeeper/oauth/client_credentials/validation' module Doorkeeper module OAuth class ClientCredentialsRequest include Validations include OAuth::RequestConcern attr_accessor :issuer, :server, :client, :original_scopes attr_reader :response alias :error_response :response delegate :error, to: :issuer def issuer @issuer ||= Issuer.new(server, Validation.new(server, self)) end def initialize(server, client, parameters = {}) @client, @server = client, server @response = nil @original_scopes = parameters[:scope] end def access_token issuer.token end private def valid? issuer.create(client, scopes) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems