Class: Coach4rb::Proxy::Access
Overview
This class provides a general access proxy for the cyber coach service. It is used to have global access to the cuber coach service in the perspective of a specific user.
Instance Attribute Summary (collapse)
-
- (Object) password
readonly
Returns the value of attribute password.
-
- (Object) username
readonly
Returns the value of attribute username.
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Access) initialize(username, password, coach)
constructor
Creates an access proxy which provides global access to the cyber coach in the scope of the given user credentials.
-
- (Hash) proxy_options
Returns an hash with basic auth http options.
Methods inherited from Base
Methods included from Mixin::BasicAuth
Constructor Details
- (Access) initialize(username, password, coach)
Creates an access proxy which provides global access to the cyber coach in the scope of the given user credentials.
Examples
97 98 99 100 101 102 |
# File 'lib/coach4rb/proxy.rb', line 97 def initialize(username, password, coach) @username = username @password = password @coach = coach @base64 = basic_auth_encryption(@username, @password) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Coach4rb::Proxy::Base
Instance Attribute Details
- (Object) password (readonly)
Returns the value of attribute password
84 85 86 |
# File 'lib/coach4rb/proxy.rb', line 84 def password @password end |
- (Object) username (readonly)
Returns the value of attribute username
84 85 86 |
# File 'lib/coach4rb/proxy.rb', line 84 def username @username end |
Instance Method Details
- (Hash) proxy_options
Returns an hash with basic auth http options.
108 109 110 |
# File 'lib/coach4rb/proxy.rb', line 108 def {authorization: @base64} end |