java.lang.Object
swiss.trustbroker.federation.xmlconfig.Script
All Implemented Interfaces:
Serializable

public class Script extends Object implements Serializable
Groovy script hook configuration. The following script hooks are supported:
  • OnRequest: Inbound validation hook on RP request
  • BeforeHrd: Allows to pre-select programmatically a CP based on RP information and network topology parameters (access to HTTP request layer according to J2EE servlet API).
  • OnCpRequest: Outbound hook on CP request.
  • BeforeIdm: On both sides of the federation (CP and RP) this hook is called before the IDM services are invoked.
  • AfterIdm: On RP side of the federation these hooks are called after IDM related data collection and before calling access request and assembling and filtering the RP assertion attributes.
  • OnResponse: This script is called just before assembling and signing SAML assertion.
  • OnUserInfo: On OIDC user info request
  • OnToken: This script is called just before assembling and signing OIDC tokens.
The following beans are passed to the scripts, some depending on the hook:
  • LOG: SLF4J Logger
  • HTTPRequest: Jakarta HttpServletRequest
  • RPRequest: XTB RpRequest
  • CPResponse: XTB CpResponse
  • SAMLResponse: OpenSAML Response
  • SAMLRequest: OpenSAML RequestAbstractType
  • IDMQueryList: List of XTB IdmQuery executed
  • RPConfig: XTB RelyingPartySetupService
  • ClaimValues: List of Object values for OIDC value conversion
See Also:
  • Constructor Details

    • Script

      public Script()
    • Script

      public Script(String type, String name)
      Creates a new Script instance.
      Parameters:
      type - Script types as listed above.
      name - The value identifies the script stored in the trustbroker-inventories definition/scripts directory.
  • Method Details

    • builder

      public static Script.ScriptBuilder builder()
    • getType

      public String getType()
      Script types as listed above.
    • getName

      public String getName()
      The value identifies the script stored in the trustbroker-inventories definition/scripts directory.
    • setType

      public void setType(String type)
      Script types as listed above.
    • setName

      public void setName(String name)
      The value identifies the script stored in the trustbroker-inventories definition/scripts directory.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object