Package com.nimbusds.openid.connect.sdk
Class BackChannelLogoutRequest
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.AbstractRequest
-
- com.nimbusds.openid.connect.sdk.BackChannelLogoutRequest
-
@Immutable public class BackChannelLogoutRequest extends AbstractRequest
Back-channel logout request initiated by an OpenID provider (OP).Example HTTP request:
POST /backchannel_logout HTTP/1.1 Host: rp.example.org Content-Type: application/x-www-form-urlencoded logout_token=eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
Related specifications:
- OpenID Connect Back-Channel Logout 1.0, section 2.5 (draft 04).
-
-
Constructor Summary
Constructors Constructor Description BackChannelLogoutRequest(URI uri, com.nimbusds.jwt.JWT logoutToken)
Creates a new back-channel logout request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.nimbusds.jwt.JWT
getLogoutToken()
Returns the logout token.static BackChannelLogoutRequest
parse(HTTPRequest httpRequest)
Parses a back-channel logout request from the specified HTTP request.static BackChannelLogoutRequest
parse(URI uri, Map<String,List<String>> params)
Parses a back-channel logout request from the specified URI and request body parameters.static BackChannelLogoutRequest
parse(Map<String,List<String>> params)
Parses a back-channel logout request from the specified request body parameters.HTTPRequest
toHTTPRequest()
Returns the matching HTTP request.Map<String,List<String>>
toParameters()
Returns the parameters for this back-channel logout request.-
Methods inherited from class com.nimbusds.oauth2.sdk.AbstractRequest
getEndpointURI
-
-
-
-
Constructor Detail
-
BackChannelLogoutRequest
public BackChannelLogoutRequest(URI uri, com.nimbusds.jwt.JWT logoutToken)
Creates a new back-channel logout request.- Parameters:
uri
- The back-channel logout URI. May benull
if thetoHTTPRequest()
method will not be used.logoutToken
- The logout token. Must be signed, or signed and encrypted. Must not benull
.
-
-
Method Detail
-
getLogoutToken
public com.nimbusds.jwt.JWT getLogoutToken()
Returns the logout token.- Returns:
- The logout token.
-
toParameters
public Map<String,List<String>> toParameters()
Returns the parameters for this back-channel logout request.Example parameters:
logout_token=eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
- Returns:
- The parameters.
-
toHTTPRequest
public HTTPRequest toHTTPRequest()
Description copied from interface:Request
Returns the matching HTTP request.- Returns:
- The HTTP request.
-
parse
public static BackChannelLogoutRequest parse(Map<String,List<String>> params) throws ParseException
Parses a back-channel logout request from the specified request body parameters.Example parameters:
logout_token = eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
- Parameters:
params
- The parameters. Must not benull
.- Returns:
- The back-channel logout request.
- Throws:
ParseException
- If the parameters couldn't be parsed to a back-channel logout request.
-
parse
public static BackChannelLogoutRequest parse(URI uri, Map<String,List<String>> params) throws ParseException
Parses a back-channel logout request from the specified URI and request body parameters.Example parameters:
logout_token = eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
- Parameters:
uri
- The back-channel logout URI. May benull
if thetoHTTPRequest()
method will not be used.params
- The parameters. Must not benull
.- Returns:
- The back-channel logout request.
- Throws:
ParseException
- If the parameters couldn't be parsed to a back-channel logout request.
-
parse
public static BackChannelLogoutRequest parse(HTTPRequest httpRequest) throws ParseException
Parses a back-channel logout request from the specified HTTP request.Example HTTP request (POST):
POST /backchannel_logout HTTP/1.1 Host: rp.example.org Content-Type: application/x-www-form-urlencoded logout_token=eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
- Parameters:
httpRequest
- The HTTP request. Must not benull
.- Returns:
- The back-channel logout request.
- Throws:
ParseException
- If the HTTP request couldn't be parsed to a back-channel logout request.
-
-