Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

This page describes a mechanism to send custom error codes to client side in case of defined/identified errors, using a custom grant handler. This simply uses the previous mobile grant sample and add the specific error codes/messages.

Excerpt

Resources:

Here is the Maven buildable source, compatible with WSO2 Identity Server 5.1.0 version. The attached jar file can be directly used as well.

Buildable Sourcecustom-grant.zip
Built Jar Filecustom-grant-1.0.0.jar

Sample Code:

Following is the relevant code segment in the sample class "org.wso2.sample.identity.oauth2.grant.mobile.MobileGrant" inside validateGrant method.

...