Class TrustedDirectoryService

java.lang.Object
org.forgerock.openig.fapi.dcr.trusteddirectory.TrustedDirectoryService

public class TrustedDirectoryService extends Object
Service that provides TrustedDirectory instances supported by the application.

This service also provides the decodeSoftwareStatementAssertion method which works on the software statement assertion JWT String (which will be provided in the client registration request) and returns a SoftwareStatement object by delegating decoding to the TrustedDirectory that issued the software statement assertion (if it is supported).

 {
      "type": "TrustedDirectoryService",
      "config": {
         "trustedDirectories": List<TrustedDirectory>         [REQUIRED - The list of trusted directories to support]
      }
 }
 
 
The example configuration below shows how to configure a service that supports a single trusted directory:
 {
     "name": "TrustedDirectoryService",
     "type" : "TrustedDirectoryService",
     "config" : {
       "trustedDirectories" : ["OpenBankingTestDirectory"]
      }
 }
 
 
See TrustedDirectory for more information on how to configure a trusted directory.
  • Method Details

    • decodeSoftwareStatementAssertion

      public Promise<SoftwareStatement,FapiException> decodeSoftwareStatementAssertion(String softwareStatementAssertionJwtString)
      Decodes a SoftwareStatement from a software statement assertion JWT String.

      Verifies that the software statement assertion was issued by a supported TrustedDirectory by locating the directory using the issuer name (see getTrustedDirectory(String)) then delegating to TrustedDirectory.decodeSoftwareStatementAssertion(SignedJwt) to do the actual decoding.

      Parameters:
      softwareStatementAssertionJwtString - the software statement assertion JWT String to transform into a SoftwareStatement
      Returns:
      a Promise containing either a valid SoftwareStatement or a InvalidSoftwareStatementException. The exception is returned if trusted directory is not supported or the software statement assertion is invalid, see TrustedDirectory.decodeSoftwareStatementAssertion(SignedJwt) for more details.