Suggestion for Advanced Syntax for Claims - ends_with string function
The example for the use of regex matching is for validation of a company domain for mail address - https://bitbucket.org/openid/ekyc-ida/src/b90e85dae0f173e0e00cb1a03916efc40ed3ac74/asc/examples/request/asc_tc_partial_matching.json#lines-3:10
This could be supported by providing simple string functions as options:
An ends_with
string function, (something that is supported in all languages so trivial implementation) could achieve the same results and makes for an easier user experience when requesting the transformed claim.
The above example would become:
"company_email": {
"claim": "email",
"fn": [
[
"ends_with",
"@company.com"
]
]
}
No regex is required avoiding the potential for catastrophic backtracking
as mentioned in the considerations for use of match
.
Happy to discuss further or any other additional use cases to consider.
Comments (2)
-
-
- changed status to open
- Log in to comment
Thank you, I just sneaked this change into the new SAO PR: https://bitbucket.org/openid/ekyc-ida/pull-requests/172/sao-second-attempt