LoginToken v1.2

Generates a token for the specified service which can be used to log in to that service.

What can I do with loginToken?

LoginToken can be used to generate new tokens and retrieve information about existing ones.

  • Issue a POST to generate a new token.
  • Log in to the Sign-Up.to client application using token (see example).
  • Use serivce to get all tokens issued for the selected service.

GET /loginToken or /loginToken/:id

AttributeTypeFilterSortDescription
id
intYesYesUnique ID of the resource.
service
enumNoNoThe service this token will be used by (currently only "sutclientapp", which is the Sign-Up.to client application).
token
stringNoNoThe generated login token.
user_id
intNoNoThe user id of the user that created this login token.
cdate
decimalNoYesCreation timestamp.

HEAD /loginToken or /loginToken/:id

AttributeTypePresenceDescription
id
intOptionalUnique ID of the resource.

POST /loginToken

AttributeTypePresenceDescription
service
enumRequiredThe service this token will be used by (currently only "sutclientapp", which is the Sign-Up.to client application).

PUT /loginToken or /loginToken/:id

This method is not supported.

DELETE /loginToken or /loginToken/:id

AttributeTypePresenceDescription
id
intRequiredUnique ID of the resource.

Error codes

There are no error codes for this endpoint.

Examples

JSON response

{
    "id"          : 123456,
    "service"     : "sutclientapp",
    "token"       : "98TdTdgtJoXLQjHAmO5FYrx0a5JiqYUp",
    "user_id"     : 123,
    "cdate"       : 123456
}

Login form

<?php $loginURL = "https://secure.sign-up.to/"; ?>
<form method="post" action="<?=$loginURL?>">
   <input type="text" name="uid" value="<?=$userID?>"/>
   <input type="text" name="cid" value="<?=$companyID?>"/>
   <input type="text" name="logintoken" value="<?=$loginToken?>"/>
   <input type="text" name="failureurl" value="<?=$failureRedirectURL?>"/>
   <input type="text" name="successurl" value="<?=$successRedirectURL?>"/>
   <input type="submit">
</form>