Sha256: 0e440b13ca4a431006d312e0efc586baf4db8ce85efc2f5cd7079fa48ced1d7a
Contents?: true
Size: 774 Bytes
Versions: 20
Compression:
Stored size: 774 Bytes
Contents
# encoding: utf-8 module BitBucket module Authorization # Check whether authentication credentials are present def authenticated? basic_authed? || oauth_token? end # Check whether basic authentication credentials are present def basic_authed? basic_auth? || (login? && password?) end # Select authentication parameters def authentication if basic_auth? { :basic_auth => basic_auth } elsif login? && password? { :login => login, :password => password } else { } end end private def _verify_client # :nodoc: raise ArgumentError, 'Need to provide client_id and client_secret' unless client_id? && client_secret? end end # Authorization end # BitBucket
Version data entries
20 entries across 20 versions & 5 rubygems