@Immutable public class UserInfoRequest extends ProtectedResourceRequest
Example HTTP GET request:
GET /userinfo HTTP/1.1 Host: server.example.com Authorization: Bearer SlAV32hkKG
Related specifications:
| Constructor | Description |
|---|---|
UserInfoRequest(URI uri,
HTTPRequest.Method httpMethod,
BearerAccessToken accessToken) |
Creates a new UserInfo request.
|
UserInfoRequest(URI uri,
BearerAccessToken accessToken) |
Creates a new UserInfo HTTP GET request.
|
| Modifier and Type | Method | Description |
|---|---|---|
HTTPRequest.Method |
getMethod() |
Gets the HTTP method for this UserInfo request.
|
static UserInfoRequest |
parse(HTTPRequest httpRequest) |
Parses the specified HTTP request for a UserInfo request.
|
HTTPRequest |
toHTTPRequest() |
Returns the matching HTTP request.
|
getEndpointURIclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessTokenpublic UserInfoRequest(URI uri, BearerAccessToken accessToken)
uri - The URI of the UserInfo 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 UserInfoRequest(URI uri, HTTPRequest.Method httpMethod, BearerAccessToken accessToken)
uri - The URI of the UserInfo endpoint. May be
null if the toHTTPRequest() method
will not be used.httpMethod - The HTTP method. Must be HTTP GET or POST and not
null.accessToken - An OAuth 2.0 Bearer access token for the request.
Must not be null.public HTTPRequest.Method getMethod()
public HTTPRequest toHTTPRequest()
Requestpublic static UserInfoRequest parse(HTTPRequest httpRequest) throws ParseException
httpRequest - The HTTP request. Must not be null.ParseException - If the HTTP request couldn't be parsed to a
UserInfo request.Copyright © 2018 Connect2id Ltd.. All rights reserved.