Class: Superset::GuestToken
- Inherits:
-
Object
- Object
- Superset::GuestToken
- Includes:
- Credential::EmbeddedUser
- Defined in:
- lib/superset/guest_token.rb
Instance Attribute Summary collapse
-
#current_user ⇒ Object
Returns the value of attribute current_user.
-
#embedded_dashboard_id ⇒ Object
Returns the value of attribute embedded_dashboard_id.
Instance Method Summary collapse
- #guest_token ⇒ Object
-
#initialize(embedded_dashboard_id:, current_user: nil) ⇒ GuestToken
constructor
A new instance of GuestToken.
- #params ⇒ Object
Methods included from Credential::EmbeddedUser
Constructor Details
#initialize(embedded_dashboard_id:, current_user: nil) ⇒ GuestToken
Returns a new instance of GuestToken.
7 8 9 10 |
# File 'lib/superset/guest_token.rb', line 7 def initialize(embedded_dashboard_id: , current_user: nil) @embedded_dashboard_id = @current_user = current_user end |
Instance Attribute Details
#current_user ⇒ Object
Returns the value of attribute current_user.
5 6 7 |
# File 'lib/superset/guest_token.rb', line 5 def current_user @current_user end |
#embedded_dashboard_id ⇒ Object
Returns the value of attribute embedded_dashboard_id.
5 6 7 |
# File 'lib/superset/guest_token.rb', line 5 def @embedded_dashboard_id end |
Instance Method Details
#guest_token ⇒ Object
12 13 14 |
# File 'lib/superset/guest_token.rb', line 12 def guest_token response_body['token'] end |
#params ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/superset/guest_token.rb', line 16 def params { "resources": [ { "id": .to_s, "type": "dashboard" } ], "rls": [], "user": current_user_params } end |