Class OID4VCAuthorizationDetailsProcessor
java.lang.Object
org.keycloak.protocol.oid4vc.issuance.OID4VCAuthorizationDetailsProcessor
- All Implemented Interfaces:
AuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>,Provider
public class OID4VCAuthorizationDetailsProcessor
extends Object
implements AuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()handleMissingAuthorizationDetails(UserSessionModel userSession, ClientSessionContext clientSessionCtx) Method is invoked in cases when authorization_details parameter is missing in the request.booleanChecks if this processor should be regarded as supported in the running context.process(UserSessionModel userSession, ClientSessionContext clientSessionCtx, AuthorizationDetailsJSONRepresentation authzDetail) Processes the authorization_details parameter and returns a response if this processor is able to handle the given authorization_details parameter.processStoredAuthorizationDetails(UserSessionModel userSession, ClientSessionContext clientSessionCtx, AuthorizationDetailsJSONRepresentation storedAuthDetails) Method is invoked when authorization_details was used in the authorization request but is missing from the token request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.protocol.oidc.rar.AuthorizationDetailsProcessor
getSupportedAuthorizationDetails
-
Constructor Details
-
OID4VCAuthorizationDetailsProcessor
-
-
Method Details
-
isSupported
public boolean isSupported()Description copied from interface:AuthorizationDetailsProcessorChecks if this processor should be regarded as supported in the running context.- Specified by:
isSupportedin interfaceAuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>
-
getSupportedType
- Specified by:
getSupportedTypein interfaceAuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>- Returns:
- supported type of authorization_details "type" claim, which this processor is able to process. This should usually correspond with the "providerId" of
the
AuthorizationDetailsProcessorFactory, which created this processor
-
getSupportedResponseJavaType
- Specified by:
getSupportedResponseJavaTypein interfaceAuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>- Returns:
- supported Java type of
AuthorizationDetailsJSONRepresentationsubclass, which this processor can create in the token response
-
process
public OID4VCAuthorizationDetailResponse process(UserSessionModel userSession, ClientSessionContext clientSessionCtx, AuthorizationDetailsJSONRepresentation authzDetail) Description copied from interface:AuthorizationDetailsProcessorProcesses the authorization_details parameter and returns a response if this processor is able to handle the given authorization_details parameter.- Specified by:
processin interfaceAuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>- Parameters:
userSession- the user sessionclientSessionCtx- the client session contextauthzDetail- the authorization_details member (usually one member from the list) sent in the "authorization_details" request parameter- Returns:
- authorization details response if this processor can handle the parameter, null if the parameter is incompatible with this processor
-
handleMissingAuthorizationDetails
public List<OID4VCAuthorizationDetailResponse> handleMissingAuthorizationDetails(UserSessionModel userSession, ClientSessionContext clientSessionCtx) Description copied from interface:AuthorizationDetailsProcessorMethod is invoked in cases when authorization_details parameter is missing in the request. It allows processor to generate authorization details response in such a case- Specified by:
handleMissingAuthorizationDetailsin interfaceAuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>- Parameters:
userSession- the user sessionclientSessionCtx- the client session context- Returns:
- authorization details response if this processor can handle current request in case that authorization_details parameter was not provided
-
processStoredAuthorizationDetails
public OID4VCAuthorizationDetailResponse processStoredAuthorizationDetails(UserSessionModel userSession, ClientSessionContext clientSessionCtx, AuthorizationDetailsJSONRepresentation storedAuthDetails) throws InvalidAuthorizationDetailsException Description copied from interface:AuthorizationDetailsProcessorMethod is invoked when authorization_details was used in the authorization request but is missing from the token request. This method should process the stored authorization_details and ensure they are returned in the token response.- Specified by:
processStoredAuthorizationDetailsin interfaceAuthorizationDetailsProcessor<OID4VCAuthorizationDetailResponse>- Parameters:
userSession- the user sessionclientSessionCtx- the client session contextstoredAuthDetails- the parsed member (usually one member of the list) from the authorization_details parameter that were stored during the authorization request- Returns:
- authorization details response if this processor can handle the stored authorization_details, null if the processor cannot handle the stored authorization_details
- Throws:
InvalidAuthorizationDetailsException
-
close
public void close()
-