Class: CognitoIdp::LogoutUri
- Inherits:
-
Object
- Object
- CognitoIdp::LogoutUri
- Defined in:
- lib/cognito_idp/logout_uri.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#logout_uri ⇒ Object
Returns the value of attribute logout_uri.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#response_type ⇒ Object
Returns the value of attribute response_type.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(client_id:, domain:, **options) ⇒ LogoutUri
constructor
A new instance of LogoutUri.
- #to_s ⇒ Object
Constructor Details
#initialize(client_id:, domain:, **options) ⇒ LogoutUri
Returns a new instance of LogoutUri.
7 8 9 10 11 12 13 14 15 |
# File 'lib/cognito_idp/logout_uri.rb', line 7 def initialize(client_id:, domain:, **) @client_id = client_id @domain = domain @logout_uri = [:logout_uri] @redirect_uri = [:redirect_uri] @response_type = [:response_type] @scope = [:scope] @state = [:state] end |
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
5 6 7 |
# File 'lib/cognito_idp/logout_uri.rb', line 5 def client_id @client_id end |
#domain ⇒ Object
Returns the value of attribute domain.
5 6 7 |
# File 'lib/cognito_idp/logout_uri.rb', line 5 def domain @domain end |
#logout_uri ⇒ Object
Returns the value of attribute logout_uri.
5 6 7 |
# File 'lib/cognito_idp/logout_uri.rb', line 5 def logout_uri @logout_uri end |
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
5 6 7 |
# File 'lib/cognito_idp/logout_uri.rb', line 5 def redirect_uri @redirect_uri end |
#response_type ⇒ Object
Returns the value of attribute response_type.
5 6 7 |
# File 'lib/cognito_idp/logout_uri.rb', line 5 def response_type @response_type end |
#scope ⇒ Object
Returns the value of attribute scope.
5 6 7 |
# File 'lib/cognito_idp/logout_uri.rb', line 5 def scope @scope end |
#state ⇒ Object
Returns the value of attribute state.
5 6 7 |
# File 'lib/cognito_idp/logout_uri.rb', line 5 def state @state end |
Instance Method Details
#to_s ⇒ Object
17 18 19 20 21 |
# File 'lib/cognito_idp/logout_uri.rb', line 17 def to_s URI("https://#{domain}/logout").tap do |uri| uri.query = URI.encode_www_form(params) end.to_s end |