get-info.rst (1388B)
1 .. http:get:: /info 2 3 This userinfo endpoint of the OAuth 2.0 specification. 4 This endpoint is used by the client to obtain the user's validated address. 5 6 **Request:** 7 8 Must include the token returned to the client from the ``/token`` endpoint 9 as a ``Bearer`` token in an ``Authorization`` header. 10 11 **Response:** 12 13 :http:statuscode:`200 OK`: 14 The body contains the address as a `ChallengerInfoResponse`. 15 :http:statuscode:`403 Forbidden`: 16 The bearer token is missing or invalid (malformed). 17 :http:statuscode:`404 Not found`: 18 The bearer token is invalid (includes unknown or expired). 19 Returned with ``TALER_EC_CHALLENGER_GRANT_UNKNOWN``. 20 :http:statuscode:`500 Internal Server Error`: 21 The challenger service encountered an internal error, 22 typically a database failure. Usually returned with 23 ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 24 25 **Details::** 26 27 .. ts:def:: ChallengerInfoResponse 28 29 interface ChallengerInfoResponse { 30 31 // Unique ID of the record within Challenger 32 // (identifies the rowid of the token). 33 id: Integer; 34 35 // Address that was validated. 36 // Key-value pairs, details depend on the 37 // address_type. 38 address: Object; 39 40 // Type of the address. 41 address_type: string; 42 43 // How long do we consider the address to be 44 // valid for this user. 45 expires: Timestamp; 46 47 }