examples/appnet-api-server/src/main/java/com/hedera/hashgraph/identity/hcs/example/appnet/handlers/VcHandler.java
/**
   * Resolves the status of a verifiable credential against appent's local storage.
   * Returns 200 OK when resolution was successful and writes the latest valid
   * message received from the mirror node into the response body.
   * Returns 404 NOT FOUND if resolution was unsuccessful.
   *
   * @param ctx The HTTP context.
   */
Resolves the status of a verifiable credential against appent's local storage.
Returns 200 OK when resolution was successful and writes the latest valid
message received from the mirror node into the response body.
Returns 404 NOT FOUND if resolution was unsuccessful.

@param ctx The HTTP context.
Resolves the status of a verifiable credential against appent ' s local storage . Returns 200 OK when resolution was successful and writes the latest valid message received from the mirror node into the response body . Returns 404 NOT FOUND if resolution was unsuccessful . @param ctx The HTTP context .
public void resolveVcStatus(final Context ctx) {
    try {
      String credentialHash = ctx.getPathTokens().get(PATH_PARAM_CREDENTIAL_HASH);
      String result = "";
      VerifiableCredentialStatus status = storage.resolveVcStatus(credentialHash);
      if (status == null) {
        ctx.getResponse().status(Status.NOT_FOUND);
      } else {
        result = JsonUtils.getGson().toJson(status);
      }
      ctx.render(result);
    } catch (Exception e) {
      ctx.getResponse().status(Status.BAD_REQUEST);
      ctx.render(Jackson.json(new ErrorResponse("VC status resolution failed", e)));
    }
  }
public void resolveVcStatus ( final Context ctx ) { try { String credentialHash = ctx . getPathTokens ( ) . get ( PATH_PARAM_CREDENTIAL_HASH ) ; String result = "" ; VerifiableCredentialStatus status = storage . resolveVcStatus ( credentialHash ) ; if ( status == null ) { ctx . getResponse ( ) . status ( Status . NOT_FOUND ) ; } else { result = JsonUtils . getGson ( ) . toJson ( status ) ; } ctx . render ( result ) ; } catch ( Exception e ) { ctx . getResponse ( ) . status ( Status . BAD_REQUEST ) ; ctx . render ( Jackson . json ( new ErrorResponse ( "VC status resolution failed" , e ) ) ) ; } }
Resolves the status of a verifiable credential against appent's local storage.
Resolves the status of a verifiable credential against appent ' s local storage .