|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nimbusds.openid.connect.sdk.UserInfoRequest
@Immutable public final class UserInfoRequest
UserInfo request. Used to retrieve requested claims about the end-user. This class is immutable.
Example HTTP GET request:
GET /userinfo?schema=openid HTTP/1.1 Host: server.example.com Authorization: Bearer mF_9.B5f-4.1JqM
Example HTTP POST request:
POST /userinfo HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded schema=openid&access_token=mF_9.B5f-4.1JqM
Related specifications:
Constructor Summary | |
---|---|
UserInfoRequest(AccessToken accessToken)
Creates a new UserInfo HTTP GET request. |
|
UserInfoRequest(HTTPRequest.Method httpMethod,
AccessToken accessToken)
Creates a new UserInfo request. |
Method Summary | |
---|---|
AccessToken |
getAccessToken()
Gets the UserInfo access token. |
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(URL url)
Returns the matching HTTP request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserInfoRequest(AccessToken accessToken)
accessToken
- The UserInfo access token. Must not be
null
.public UserInfoRequest(HTTPRequest.Method httpMethod, AccessToken accessToken)
httpMethod
- The HTTP method. Must be HTTP GET or POST and not
null
.accessToken
- The UserInfo access token. Must not be
null
.Method Detail |
---|
public HTTPRequest.Method getMethod()
public AccessToken getAccessToken()
public HTTPRequest toHTTPRequest(URL url) throws SerializeException
Request
toHTTPRequest
in interface Request
url
- The URL of the HTTP endpoint for which the request is
intended. Must not be null
.
SerializeException
- If the request message couldn't be
serialised to an HTTP request.public 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |