Class: BirdGrinder::Tweeter::BasicAuthorization
- Inherits:
-
AbstractAuthorization
- Object
- AbstractAuthorization
- BirdGrinder::Tweeter::BasicAuthorization
- Defined in:
- lib/bird_grinder/tweeter/basic_authorization.rb
Instance Attribute Summary collapse
-
#basic_auth_credentials ⇒ Object
readonly
Returns the value of attribute basic_auth_credentials.
Instance Method Summary collapse
-
#header_for(http) ⇒ Object
Authenticats a given request using Basic authorization.
-
#initialize ⇒ BasicAuthorization
constructor
A new instance of BasicAuthorization.
Methods inherited from AbstractAuthorization
Constructor Details
#initialize ⇒ BasicAuthorization
Returns a new instance of BasicAuthorization.
5 6 7 |
# File 'lib/bird_grinder/tweeter/basic_authorization.rb', line 5 def initialize @basic_auth_credentials = [BirdGrinder::Settings.username, BirdGrinder::Settings.password] end |
Instance Attribute Details
#basic_auth_credentials ⇒ Object (readonly)
Returns the value of attribute basic_auth_credentials.
9 10 11 |
# File 'lib/bird_grinder/tweeter/basic_authorization.rb', line 9 def basic_auth_credentials @basic_auth_credentials end |
Instance Method Details
#header_for(http) ⇒ Object
Authenticats a given request using Basic authorization.
12 13 14 |
# File 'lib/bird_grinder/tweeter/basic_authorization.rb', line 12 def header_for(http) @basic_auth_credentials end |