Skip to content

Detect SAML request rule expression - #17

Open
choontat-pixl8 wants to merge 3 commits into
pixl8:stablefrom
choontat-pixl8:feature-detect-saml-request-rule-expression
Open

Detect SAML request rule expression#17
choontat-pixl8 wants to merge 3 commits into
pixl8:stablefrom
choontat-pixl8:feature-detect-saml-request-rule-expression

Conversation

@choontat-pixl8

Copy link
Copy Markdown
Contributor

No description provided.

* @serviceProviders.multiple true
*/
private boolean function evaluateExpression( event, rc, prc, boolean _is=true, string serviceProviders="" ){
if ( !isStruct( rc.samlRequest ?: "" ) ) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic. Great work making this concise. However, it is missing taking the _is into account. I suggest refactoring to something along the lines of:

var isSamlLoginRequest = false;
if ( IsStruct( rc.samlRequest ?: "" ) ) {
    if ( !Len( arguments.serviceProviders ) || ListFindNoCase( ... ) ) {
        isSamlLoginRequest = true;
    }
}
return isSamlLoginRequest == arguments._is;

@DominicWatson

Copy link
Copy Markdown
Contributor

Fab, thanks @choontat-pixl8 - merging for QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants