Sha256: 61bfb83278eb0b2ce62b00eba60c2aead20ad2cb10cd983e81dc34f640472f69
Contents?: true
Size: 928 Bytes
Versions: 1
Compression:
Stored size: 928 Bytes
Contents
require 'doorkeeper/oauth/client_credentials/validation' module Doorkeeper module OAuth class ClientCredentialsRequest class Issuer attr_accessor :token, :validation, :error def initialize(server, validation) @server, @validation = server, validation end def create(client, scopes, creator = Creator.new) if validation.valid? @token = create_token(client, scopes, creator) @error = :server_error unless @token else @token = false @error = validation.error end @token end private def create_token(client, scopes, creator) creator.call(client, scopes, { :use_refresh_token => false, :expires_in => @server.access_token_expires_in }) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
couchkeeper-0.6.7 | lib/doorkeeper/oauth/client_credentials/issuer.rb |