Get Authentication Token (Single Sign-On)

Description

This function generates a one time use token with a 5 minute expiration and returns a URL containing the token which can be used as an HTTP redirect authenticating a user into the credit exchange. This is a single sign-on mechanism that allows authentication from trusted 3rd party applications without having to share credentials.

Authentication

Requires HTTP BASIC authentication. The authenticating user must have ROLE_API_AUTH assigned.

HTTP Methods

Accepts GET and POST requests.

URI

/api/auth.json

Path Variables

No path variables.

Parameters

Name Required/Optional Description Validation
username required The username of the user to single sign-on. The username is expected to be the user's email address. Username should be valid.

Curl Example

Request

curl -u apiuser:test "https://www.factorsnetwork.com/api/auth.json?username=jondoe@domain.com"
						

Response

{
  "url":"https://www.factorsnetwork.com/api/auth/312ba4eb-2323-6fd5-3456-214e23b2a7b7"
}
When the user visits this URL with a web browser, they will be automatically authenticated and forwarded to the dashboard.