Class: SacsRuby::Credentials
- Inherits:
-
Object
- Object
- SacsRuby::Credentials
- Defined in:
- lib/sacs_ruby/credentials.rb
Overview
Class for constructing base64 encoded credentials
Instance Attribute Summary collapse
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#encoded ⇒ Object
readonly
Returns the value of attribute encoded.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize ⇒ Credentials
constructor
A new instance of Credentials.
Constructor Details
#initialize ⇒ Credentials
Returns a new instance of Credentials.
8 9 10 11 12 13 14 15 |
# File 'lib/sacs_ruby/credentials.rb', line 8 def initialize fail ConfigurationError if SacsRuby.configuration.nil? @user_id = SacsRuby.configuration.user_id @group = SacsRuby.configuration.group @domain = SacsRuby.configuration.domain @client_secret = SacsRuby.configuration.client_secret @encoded = encode("#{encoded_client_id}:#{encoded_client_secret}") end |
Instance Attribute Details
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
6 7 8 |
# File 'lib/sacs_ruby/credentials.rb', line 6 def client_secret @client_secret end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
6 7 8 |
# File 'lib/sacs_ruby/credentials.rb', line 6 def domain @domain end |
#encoded ⇒ Object (readonly)
Returns the value of attribute encoded.
6 7 8 |
# File 'lib/sacs_ruby/credentials.rb', line 6 def encoded @encoded end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
6 7 8 |
# File 'lib/sacs_ruby/credentials.rb', line 6 def group @group end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
6 7 8 |
# File 'lib/sacs_ruby/credentials.rb', line 6 def user_id @user_id end |