Sha256: a5331c7125c1e093881b2fba75c4af2418ded4c2ecb803c177d16ebb3a15a185
Contents?: true
Size: 584 Bytes
Versions: 1
Compression:
Stored size: 584 Bytes
Contents
module Doorkeeper module OAuth class Client class Credentials < Struct.new(:uid, :secret) extend Methods def self.from_request(request, *credentials_methods) credentials_methods.inject(nil) do |credentials, method| method = self.method(method) if method.is_a?(Symbol) credentials = Credentials.new *method.call(request) break credentials unless credentials.blank? end end def blank? uid.blank? || secret.blank? 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.rb |