PingCentral

SpEL approval expression examples

This section contains SpEL approval expression examples for OAuth and SAML applications.

OAuth approval example

In this example, if the Require Approval If Any Expression Succeeds option is selected and the application is an OAuth application with the Client Credentials grant type, PingCentral requires that an administrator approve the promotion before the application owner can promote it to the target environment.

#jsonPath(#application, 'type').equals('OAuth')
&& #jsonPath(#application,
'grantTypes').contains('CLIENT_CREDENTIALS')

SAML SP approval example

In this example, if the Require Approval If Any Expression Succeeds option is selected, the application is a SAML SP application, and one or more of the attribute mappings are OGNL expressions, PingCentral requires that an administrator approve the promotion before the application owner can promote it to the target environment.

#jsonPath(#application, 'type').equals('SAML_20_SP')
&& !#jsonPath(#application,
"attributeMappings[?(@.type == 'EXPRESSION')]").isEmpty()