Class: ShellDataReportingApIs::BearerTokenCredentials
- Inherits:
-
Object
- Object
- ShellDataReportingApIs::BearerTokenCredentials
- Defined in:
- lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb
Overview
Data class for BearerTokenCredentials.
Instance Attribute Summary collapse
-
#o_auth_client_id ⇒ Object
readonly
Returns the value of attribute o_auth_client_id.
-
#o_auth_client_secret ⇒ Object
readonly
Returns the value of attribute o_auth_client_secret.
-
#o_auth_clock_skew ⇒ Object
readonly
Returns the value of attribute o_auth_clock_skew.
-
#o_auth_on_token_update ⇒ Object
readonly
Returns the value of attribute o_auth_on_token_update.
-
#o_auth_token ⇒ Object
readonly
Returns the value of attribute o_auth_token.
-
#o_auth_token_provider ⇒ Object
readonly
Returns the value of attribute o_auth_token_provider.
Instance Method Summary collapse
- #clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ Object
-
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ BearerTokenCredentials
constructor
A new instance of BearerTokenCredentials.
Constructor Details
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ BearerTokenCredentials
Returns a new instance of BearerTokenCredentials.
101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 101 def initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) raise ArgumentError, 'o_auth_client_id cannot be nil' if o_auth_client_id.nil? raise ArgumentError, 'o_auth_client_secret cannot be nil' if o_auth_client_secret.nil? @o_auth_client_id = o_auth_client_id @o_auth_client_secret = o_auth_client_secret @o_auth_token = o_auth_token @o_auth_token_provider = o_auth_token_provider @o_auth_on_token_update = o_auth_on_token_update @o_auth_clock_skew = o_auth_clock_skew end |
Instance Attribute Details
#o_auth_client_id ⇒ Object (readonly)
Returns the value of attribute o_auth_client_id.
97 98 99 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 97 def o_auth_client_id @o_auth_client_id end |
#o_auth_client_secret ⇒ Object (readonly)
Returns the value of attribute o_auth_client_secret.
97 98 99 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 97 def o_auth_client_secret @o_auth_client_secret end |
#o_auth_clock_skew ⇒ Object (readonly)
Returns the value of attribute o_auth_clock_skew.
97 98 99 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 97 def o_auth_clock_skew @o_auth_clock_skew end |
#o_auth_on_token_update ⇒ Object (readonly)
Returns the value of attribute o_auth_on_token_update.
97 98 99 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 97 def o_auth_on_token_update @o_auth_on_token_update end |
#o_auth_token ⇒ Object (readonly)
Returns the value of attribute o_auth_token.
97 98 99 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 97 def o_auth_token @o_auth_token end |
#o_auth_token_provider ⇒ Object (readonly)
Returns the value of attribute o_auth_token_provider.
97 98 99 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 97 def o_auth_token_provider @o_auth_token_provider end |
Instance Method Details
#clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 115 def clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) o_auth_client_id ||= self.o_auth_client_id o_auth_client_secret ||= self.o_auth_client_secret o_auth_token ||= self.o_auth_token o_auth_token_provider ||= self.o_auth_token_provider o_auth_on_token_update ||= self.o_auth_on_token_update o_auth_clock_skew ||= self.o_auth_clock_skew BearerTokenCredentials.new(o_auth_client_id: o_auth_client_id, o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token, o_auth_token_provider: o_auth_token_provider, o_auth_on_token_update: o_auth_on_token_update, o_auth_clock_skew: o_auth_clock_skew) end |