-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (112 loc) · 8.32 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/style.css?t=90051322">
<link rel="stylesheet" href="style.css?t=1067e8dd">
<script src="assets/script.js?t=93f1a66c"></script>
<title>SCIM Filter Parser</title>
<meta name="viewport" content="width=device-width">
</head>
<body class="-menu-visible">
<div class="doc-layout">
<div class="toggle menu-toggle js-menu-toggle"></div>
<div class="menu toc-menu">
<ul>
<li class="menu-item -level-0 -parent">
<ul class="submenu">
<li class="menu-item -level-1"><a class="link title -active link-index" href="index.html">SCIM Filter Parser</a>
<ul class="headings heading-list">
<li class="heading-item -depth-2"><a class="hlink link-installation" href="#installation">Installation</a>
</li>
<li class="heading-item -depth-2"><a class="hlink link-usage" href="#usage">Usage</a>
</li>
<li class="heading-item -depth-2"><a class="hlink link-issues" href="#issues">Issues</a>
</li>
<li class="heading-item -depth-2"><a class="hlink link-known-limitations" href="#known-limitations">Known limitations</a>
</li>
</ul>
</li>
<li class="menu-item -level-1"><a class="link title link-getting-started" href="getting-started.html">Getting Started</a>
</li>
<li class="menu-item -level-1"><a class="link title link-parsers" href="parsers.html">Parsers</a>
</li>
<li class="menu-item -level-1 -parent"><a class="link title link-ast" href="ast/index.html">AST</a>
<ul class="submenu">
<li class="menu-item -level-2"><a class="link title link-astattribute-path" href="ast/attribute-path.html">Attribute path</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astcomparison" href="ast/comparison.html">Comparison</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astconjunction" href="ast/conjunction.html">Conjunction</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astconnective" href="ast/connective.html">Connective</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astdisjunction" href="ast/disjunction.html">Disjunction</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astnegation" href="ast/negation.html">Negation</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astoperator" href="ast/operator.html">Operator</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astpath" href="ast/path.html">Path</a>
</li>
<li class="menu-item -level-2"><a class="link title link-astvalue-path" href="ast/value-path.html">Value path</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="body page-index">
<div class="header-nav">
<div class="right"><a class="iconlink" href="https://github.com/Cloudstek/scim-filter-parser" data-title="Cloudstek/scim-filter-parser">
<!-- span.title Open in GitHub--><span class="icon -github"></span></a>
</div>
</div>
<div class="markdown-body"><h1 id="scim-filter-parser">SCIM Filter Parser</h1>
<blockquote>
<p>Parser for the SCIM (<a href="https://tools.ietf.org/html/rfc7644">IETF RFC 7644, System for Cross-domain Identity Management</a>) filter syntax.</p>
</blockquote>
<p><a href="https://github.com/Cloudstek/scim-filter-parser/actions"><img src="https://img.shields.io/github/workflow/status/Cloudstek/scim-filter-parser/PHPunit%20Tests" alt="GitHub Workflow Status"></a> <a href="https://coveralls.io/github/Cloudstek/scim-filter-parser?branch=master"><img src="https://coveralls.io/repos/github/Cloudstek/scim-filter-parser/badge.svg?branch=master" alt="Coverage Status"></a> <a href="https://scrutinizer-ci.com/g/Cloudstek/scim-filter-parser/?branch=master"><img src="https://scrutinizer-ci.com/g/Cloudstek/scim-filter-parser/badges/quality-score.png?b=master" alt="Scrutinizer Code Quality"></a> <img src="https://img.shields.io/github/license/Cloudstek/scim-filter-parser" alt="GitHub"> <a href="https://github.com/Cloudstek/scim-filter-parser/releases"><img src="https://img.shields.io/github/v/tag/Cloudstek/scim-filter-parser?label=latest&sort=semver" alt="GitHub tag (latest SemVer)"></a> <a href="https://packagist.org/packages/cloudstek/scim-filter-parser"><img src="https://img.shields.io/packagist/dt/cloudstek/scim-filter-parser" alt="Packagist Downloads"></a> <a href="https://packagist.org/packages/cloudstek/scim-filter-parser"><img src="https://img.shields.io/packagist/stars/cloudstek/scim-filter-parser" alt="Packagist Stars"></a></p>
<h2 id="installation">Installation</h2>
<p>This library is available as <a href="https://getcomposer.org/">composer</a> package and this is the recommended way to install this library.</p>
<pre><code class="lang-sh">$ composer require cloudstek/scim-filter-parser
</code></pre>
<h4 id="manual-installation">Manual installation</h4>
<p>If you don't use composer, you can install this library manually using the following steps:</p>
<ol>
<li>Clone this repository or download the latest release from the <a href="https://github.com/Cloudstek/scim-filter-parser/releases">releases page</a>.</li>
<li>Require all files manually or use a PSR-4 autoloader (recommended).</li>
</ol>
<h2 id="usage">Usage</h2>
<p>As code often says more than a thousand words, a little code to get you started.</p>
<pre><code class="lang-php"><span class="hljs-meta"><?php</span>
<span class="pl-k">use</span> <span class="pl-ent">Cloudstek</span>\<span class="pl-ent">SCIM</span>\<span class="pl-ent">FilterParser</span>\<span class="pl-ent">FilterParser</span>;
<span class="pl-c">// Create the filter parser.</span>
$filterParser = <span class="pl-k">new</span> FilterParser();
<span class="pl-c">// Parse a filter string</span>
$firstFilterAst = $filterParser->parse(<span class="pl-s">'userName eq "foobar"'</span>); <span class="pl-c">// Cloudstek\SCIM\FilterParser\AST\Comparison ...</span>
<span class="pl-c">// ... walk through the AST (abstract syntax tree) and do something with it.</span>
<span class="pl-c">// The parser is stateless so you can safely parse another filter if you like.</span>
$secondFilterAst = $filterParser->parse(<span class="pl-s">'name[given eq "John" and family eq "Dough"]'</span>); <span class="pl-c">// Cloudstek\SCIM\FilterParser\AST\ValuePath ...</span>
<span class="pl-c">// Create the path parser.</span>
$pathParser = <span class="pl-k">new</span> PathParser();
<span class="pl-c">// Parse a path string, used in for example PATCH operations.</span>
$pathAst = $pathParser->parse(<span class="pl-s">'name[given eq "John"].familyName'</span>); <span class="pl-c">// Cloudstek\SCIM\FilterParser\AST\ValuePath ...</span>
</code></pre>
<h2 id="issues">Issues</h2>
<p>Please report issues on the projects <a href="https://github.com/Cloudstek/scim-filter-parser/issues">GitHub issues page</a> and be sure to include information about your PHP version, library version, filter string and resulting AST.</p>
<h2 id="known-limitations">Known limitations</h2>
<p>At the moment there are a few limitations to be aware of, though in the future these may be addressed.</p>
<ul>
<li>Does not support SCIM v1.0 (only v2)</li>
<li>Does not come with a "dumper" to provide a nice textual representation of the AST. Instead you can use <a href="https://www.php.net/manual/en/function.var-dump.php"><code>var_dump</code></a> or <a href="https://symfony.com/doc/current/components/var_dumper.html"><code>VarDumper</code></a>.</li>
</ul>
</div>
<div class="footer-nav">
<div class="right"><a href="getting-started.html"><span class="label">Next: </span><span class="title">Getting Started</span></a></div>
</div>
</div>
</div>
</body>
</html>