question

Upvotes
Accepted
1.2k 8 11 8

What is the support for external apps to login with Data Fusion?

I'm building an app on top of Data Fusion API and I'd like Data Fusion to handle authentication.

data-fusionlog-in
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
1.2k 8 11 8

Your app needs to accept a POST request with the following params:

  • username - username of logged in user
  • roles - users role(s)
  • access_token - token for API requests

Login Example

Example callback URL: http://myapp.com/loginCallback

Directing the user to the following URL will POST to the callback URL after login. The callback param must be encoded.

  • /datafusion/login/auth?callback=http%3A%2F%2Fmyapp.com%2FloginCallback

Logout Example

A callback url is also supported for logout. The user will be directed to the callback URL after logout. The callback param must be encoded.

Example callback URL: http://myapp.com/logoutCallback

  • /datafusion/j_spring_security_logout?callback=http%3A%2F%2Fmyapp.com%2FlogoutCallback

Example

  1. User navigates to http://example.com/explorer
  2. DE sees user is not authenticated. Redirects to http://example.com/datafusion/login/auth?callback=http%3A%2F%2Fexample.com%2Fexplorer%2Flogin%2FauthCallback
  3. DF presents the login form
  4. User logs in
  5. DF posts the login info to the callback URL provided in 2.
  6. DE logs in the user, redirects to http://example.com/explorer

credit @Matt Sheehan

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.