Difference between revisions of "Validate Token"

From King Arthur's Gold Wiki
Jump to: navigation, search
m
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
  
'''Implementation Status:''' [[Implemented(API Implementation Status)|Implemented]]<br/>
+
'''Implementation Status:''' [[API_Implementation_Statuses#Implemented|Implemented]]<br/>
'''URI:''' https://api.kag2d.com/player/$PLAYER/token/verification/$TOKEN<br/>
+
'''URI:''' https://api.kag2d.com/player/$PLAYER/token/$TOKEN<br/>
 
'''HTTP Verbs Supported:''' GET<br/>
 
'''HTTP Verbs Supported:''' GET<br/>
 
'''Response Type:''' JSON dictionary<br/>
 
'''Response Type:''' JSON dictionary<br/>
Line 9: Line 9:
  
 
== Request Details ==
 
== Request Details ==
This resource is the validation of the token provided.  Tokens are only allowed to be validated once, and they expire very shortly after they are created (subject to change, but assume on the order of 15-45 seconds).  The response will be a boolean true if the token provided is valid (unused, unaltered, unexpired), false in all other cases.
+
This resource is the validation of the token provided.  Tokens are only allowed to be validated once, and they expire very shortly after they are created (subject to change, but assume on the order of 15-45 seconds).  The response will be a boolean true if the token provided is valid (unused, unaltered, unexpired), false in all other cases.  '''Currently the API returns HTTP 404 when a token has already been used or expired'''; please be sure to handle this or the playerTokenVerification key appropriately as this design is not 100% final yet.
  
 
== Successful Response ==
 
== Successful Response ==
  
 
  {"playerTokenVerification": true}
 
  {"playerTokenVerification": true}
 +
 +
 +
This response may contain additional information in the future (such as player info and/or additional SSO response information if there is a SSO implementation in the future)
  
 
== Error Conditions ==
 
== Error Conditions ==
  
 
No error conditions are known/documented right now, as they would likely just end up as a 'false' token validation.
 
No error conditions are known/documented right now, as they would likely just end up as a 'false' token validation.
 +
 +
== See Also ==
 +
* [[Generate New Token]]
 +
* [[Authentication Token]]

Latest revision as of 17:58, 5 August 2013


Implementation Status: Implemented
URI: https://api.kag2d.com/player/$PLAYER/token/$TOKEN
HTTP Verbs Supported: GET
Response Type: JSON dictionary
HTTP Auth Required: No

Request Details

This resource is the validation of the token provided. Tokens are only allowed to be validated once, and they expire very shortly after they are created (subject to change, but assume on the order of 15-45 seconds). The response will be a boolean true if the token provided is valid (unused, unaltered, unexpired), false in all other cases. Currently the API returns HTTP 404 when a token has already been used or expired; please be sure to handle this or the playerTokenVerification key appropriately as this design is not 100% final yet.

Successful Response

{"playerTokenVerification": true}


This response may contain additional information in the future (such as player info and/or additional SSO response information if there is a SSO implementation in the future)

Error Conditions

No error conditions are known/documented right now, as they would likely just end up as a 'false' token validation.

See Also