lokulus / claimstransformation Goto Github PK
View Code? Open in Web Editor NEWAn implementation of the ADFS claims transformation language for .NET
License: MIT License
An implementation of the ADFS claims transformation language for .NET
License: MIT License
The expression EXISTS([]) returns true if any claims are present, otherwise false.
This is a breaking change from the previous version of this library where EXISTS([]) always returns true.
In order to reduce risk from the upgrade we should have a compatibility flag which preserves the old behaviour.
Given the "pass through" expression C1: [] => ISSUE(CLAIM = C1)
, if the input claims are empty an error is raised.
<>c__DisplayClass27_0.<BuildSelector>b__0() line 362
ExpressionVisitor.Visit(IssueExpression expression) line 286
ExpressionVisitor.Visit(RuleExpression expression) line 312
ClaimsTransformationEngine.Transform(RuleExpression expression, IClaimsTransformationContext context) line 56
ClaimsTransformationEngine.Transform(IEnumerable`1 rules, IClaimsTransformationContext context) line 49
ClaimsTransformationEngine.Transform(IEnumerable`1 rules, IEnumerable`1 claims) line 31
ClaimsTransformationEngine.Transform(String rule, IEnumerable`1 claims) line 25
An example test:
const string EXPRESSION = "C1: [] => ISSUE(CLAIM = C1);";
var positive = new List<Claim>();
var pass = this.Engine.Transform(EXPRESSION, positive);
Assert.AreEqual(0, pass.Count(), "At least one claim was issued.");
It is common to always grant some kind of "anonymous" claim regardless of the input claims.
For example:
C1: NOT EXISTS([]) => ISSUE(TYPE = "http://namespace/role", VALUE = "Public")
When no input claims are provided, the role=public is not issued.
I'm not actually sure if this is actually an error.
Set up a .NET action which builds and tests the project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.