Skip to content
Alban LEROUX edited this page Mar 10, 2012 · 7 revisions

API

auth.request

Request for a authentication token.

This will delete all previous requested challenge for this entity with the same session.

In other words, there is always a uniq challenge/token for a couple session/entity.

See : Authentication

no grant access required

Request example

GET http://example.com/api/get/auth.request/json/?public_key=guest&session=check+new+comment
{
	"method"  : "auth.request",
	"request" :
	{
		"public_key" : "guest",
		"session"    : "check new comment"
	}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
	<method>auth.token</method>
	<request>
		<public_key>guest</public_key>
		<session>check new comment</session>
	</refresh>
</xml>

Response example

{
	"status"   : "valid",
	"response" :
	{
		"lifetime"  : 600,
		"challenge" : "8b863651d51f3000226aa9a628df4ee8"
	}
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
	<status>valid</status>
	<response>
		<lifetime>600</lifetime>
		<challenge>8b863651d51f3000226aa9a628df4ee8</challenge>
	</response>
</xml>

Arguments

  • public_key: a entity public key
  • session: a session identifier

Return Value

  • lifetime: the challenge and token lifetime
  • challenge: the challenge
Clone this wiki locally