Interface WalletCallbackHandler
public interface WalletCallbackHandler
Interface for handling Credential issuance, revocation, requests, errors and events.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhandleCredentialIssuance(String issuer, String message, com.pingidentity.did.sdk.client.service.model.Challenge challenge, com.pingidentity.did.sdk.types.Claim claim, List<com.pingidentity.sdk.pingonewallet.errors.WalletException> errors) Handle the newly issued credential.voidhandleCredentialPresentation(String sender, String message, com.pingidentity.did.sdk.client.service.model.Challenge challenge, List<com.pingidentity.did.sdk.types.Share> claim, List<com.pingidentity.sdk.pingonewallet.errors.WalletException> errors) This callback is triggered when another wallet shares a credential with the current application instance.voidhandleCredentialRequest(PresentationRequest presentationRequest) This callback is triggered when PingOneWalletClientContract.processQrContent is called and the URL represents a Verifiable Presentation request.booleanhandleCredentialRevocation(String issuer, String message, com.pingidentity.did.sdk.client.service.model.Challenge challenge, com.pingidentity.did.sdk.types.ClaimReference claimReference, List<com.pingidentity.sdk.pingonewallet.errors.WalletException> errors) Handle the revocation of a credential.voidhandleError(com.pingidentity.sdk.pingonewallet.errors.WalletException error) This callback is triggered when the SDK runs into any errors while processing the events/messages.voidhandleEvent(WalletEvent event) Callback returns different events while using Wallet, including errors Call super.handleEvent() if you're still using `handleError` callback to manage exceptions.
-
Method Details
-
handleCredentialIssuance
boolean handleCredentialIssuance(String issuer, String message, com.pingidentity.did.sdk.client.service.model.Challenge challenge, com.pingidentity.did.sdk.types.Claim claim, List<com.pingidentity.sdk.pingonewallet.errors.WalletException> errors) Handle the newly issued credential.- Parameters:
issuer- ApplicationInstanceID of the credential issuermessage- Optional string messagechallenge- Optional challengeclaim- Issued credentialerrors- List of any errors while processing/verifying the credential- Returns:
- True if you'd like to accept the credential False if you'd like to reject the credential
-
handleCredentialRevocation
boolean handleCredentialRevocation(String issuer, String message, com.pingidentity.did.sdk.client.service.model.Challenge challenge, com.pingidentity.did.sdk.types.ClaimReference claimReference, List<com.pingidentity.sdk.pingonewallet.errors.WalletException> errors) Handle the revocation of a credential.- Parameters:
issuer- ApplicationInstanceID of the credential issuermessage- Optional string messagechallenge- Optional challengeclaimReference- ClaimReference for the revoked credentialerrors- List of any errors that occurred while revoking the credential- Returns:
- True if you'd like to revoke the credential, false if you would like to reject the revocation
-
handleCredentialPresentation
void handleCredentialPresentation(String sender, String message, com.pingidentity.did.sdk.client.service.model.Challenge challenge, List<com.pingidentity.did.sdk.types.Share> claim, List<com.pingidentity.sdk.pingonewallet.errors.WalletException> errors) This callback is triggered when another wallet shares a credential with the current application instance.- Parameters:
sender- ApplicationInstanceID of the sendermessage- Optional string messagechallenge- Optional challengeclaim- Shared credentialerrors- List of any errors that occurred while sharing the credential
-
handleCredentialRequest
This callback is triggered when PingOneWalletClientContract.processQrContent is called and the URL represents a Verifiable Presentation request.- Parameters:
presentationRequest- Request for presenting Claims from wallet
-
handleError
void handleError(com.pingidentity.sdk.pingonewallet.errors.WalletException error) This callback is triggered when the SDK runs into any errors while processing the events/messages.- Parameters:
error- This method is deprecated and will be removed in upcoming updates. Use handleEvent instead
-
handleEvent
Callback returns different events while using Wallet, including errors Call super.handleEvent() if you're still using `handleError` callback to manage exceptions.- Parameters:
event- WalletEvent
-