Package com.nimbusds.oauth2.sdk.ciba
Class CIBAPushCallback
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.AbstractRequest
-
- com.nimbusds.oauth2.sdk.ProtectedResourceRequest
-
- com.nimbusds.oauth2.sdk.ciba.CIBAPushCallback
-
- Direct Known Subclasses:
CIBAErrorDelivery
,CIBATokenDelivery
public abstract class CIBAPushCallback extends ProtectedResourceRequest
CIBA push callback to the client notification endpoint.Related specifications:
- OpenID Connect CIBA Flow - Core 1.0, section 12.3.
-
-
Constructor Summary
Constructors Constructor Description CIBAPushCallback(URI endpoint, BearerAccessToken accessToken, AuthRequestID authRequestID)
Creates a new CIBA push callback.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AuthRequestID
getAuthRequestID()
Returns the CIBA request ID.abstract boolean
indicatesSuccess()
Checks if the callback indicates success.static CIBAPushCallback
parse(HTTPRequest httpRequest)
Parses a CIBA push callback from the specified HTTP request.CIBAErrorDelivery
toErrorDelivery()
Casts this CIBA push callback to an error delivery.CIBATokenDelivery
toTokenDelivery()
Casts this CIBA push callback to token delivery.-
Methods inherited from class com.nimbusds.oauth2.sdk.ProtectedResourceRequest
getAccessToken
-
Methods inherited from class com.nimbusds.oauth2.sdk.AbstractRequest
getEndpointURI
-
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.Request
toHTTPRequest
-
-
-
-
Constructor Detail
-
CIBAPushCallback
public CIBAPushCallback(URI endpoint, BearerAccessToken accessToken, AuthRequestID authRequestID)
Creates a new CIBA push callback.- Parameters:
endpoint
- The client notification endpoint. Must not benull
.accessToken
- The client notification token. Must not benull
.authRequestID
- The CIBA request ID. Must not benull
.
-
-
Method Detail
-
indicatesSuccess
public abstract boolean indicatesSuccess()
Checks if the callback indicates success.- Returns:
true
if the callback indicates success, elsefalse
.
-
getAuthRequestID
public AuthRequestID getAuthRequestID()
Returns the CIBA request ID.- Returns:
- The CIBA request ID.
-
toTokenDelivery
public CIBATokenDelivery toTokenDelivery()
Casts this CIBA push callback to token delivery.- Returns:
- The CIBA token push delivery.
-
toErrorDelivery
public CIBAErrorDelivery toErrorDelivery()
Casts this CIBA push callback to an error delivery.- Returns:
- The CIBA error push delivery.
-
parse
public static CIBAPushCallback parse(HTTPRequest httpRequest) throws ParseException
Parses a CIBA push callback from the specified HTTP request.- Parameters:
httpRequest
- The HTTP request. Must not benull
.- Returns:
- The CIBA token or error push delivery.
- Throws:
ParseException
- If the HTTP request couldn't be parsed to a CIBA push callback.
-
-