@Immutable public class ClientReadRequest extends ProtectedResourceRequest
Example HTTP request:
GET /register/s6BhdRkqt3 HTTP/1.1 Accept: application/json Host: server.example.com Authorization: Bearer reg-23410913-abewfq.123483
Related specifications:
Constructor and Description |
---|
ClientReadRequest(java.net.URI uri,
BearerAccessToken accessToken)
Creates a new client read request.
|
Modifier and Type | Method and Description |
---|---|
static ClientReadRequest |
parse(HTTPRequest httpRequest)
Parses a client read request from the specified HTTP GET request.
|
HTTPRequest |
toHTTPRequest()
Returns the matching HTTP request.
|
getAccessToken
getEndpointURI
public ClientReadRequest(java.net.URI uri, BearerAccessToken accessToken)
uri
- The URI of the client configuration endpoint. May
be null
if the toHTTPRequest()
method will not be used.accessToken
- An OAuth 2.0 Bearer access token for the request.
Must not be null
.public HTTPRequest toHTTPRequest() throws SerializeException
Request
SerializeException
- If the request message couldn't be
serialised to an HTTP request.public static ClientReadRequest parse(HTTPRequest httpRequest) throws ParseException
httpRequest
- The HTTP request. Must not be null
.ParseException
- If the HTTP request couldn't be parsed to a
client read request.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.