Package com.nimbusds.openid.connect.sdk
Class UserInfoResponse
- java.lang.Object
-
- com.nimbusds.openid.connect.sdk.UserInfoResponse
-
- Direct Known Subclasses:
UserInfoErrorResponse
,UserInfoSuccessResponse
public abstract class UserInfoResponse extends Object implements Response
The base abstract class for UserInfo success and error responses.Related specifications:
- OpenID Connect Core 1.0, section 5.3.2 and 5.3.3.
- OAuth 2.0 Bearer Token Usage (RFC 6750), section 3.1.
-
-
Constructor Summary
Constructors Constructor Description UserInfoResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserInfoResponse
parse(HTTPResponse httpResponse)
Parses a UserInfo response from the specified HTTP response.UserInfoErrorResponse
toErrorResponse()
Casts this response to a UserInfo error response.UserInfoSuccessResponse
toSuccessResponse()
Casts this response to a UserInfo success response.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.nimbusds.oauth2.sdk.Response
indicatesSuccess, toHTTPResponse
-
-
-
-
Constructor Detail
-
UserInfoResponse
public UserInfoResponse()
-
-
Method Detail
-
toSuccessResponse
public UserInfoSuccessResponse toSuccessResponse()
Casts this response to a UserInfo success response.- Returns:
- The UserInfo success response.
-
toErrorResponse
public UserInfoErrorResponse toErrorResponse()
Casts this response to a UserInfo error response.- Returns:
- The UserInfo error response.
-
parse
public static UserInfoResponse parse(HTTPResponse httpResponse) throws ParseException
Parses a UserInfo response from the specified HTTP response.- Parameters:
httpResponse
- The HTTP response. Must not benull
.- Returns:
- The UserInfo success or error response.
- Throws:
ParseException
- If the HTTP response couldn't be parsed to a UserInfo response.
-
-