Skip to content

Commit

Permalink
Merge branch 'master' of github.com:IdentityPython/pyFF
Browse files Browse the repository at this point in the history
  • Loading branch information
leifj committed Jun 10, 2020
2 parents c508f99 + 438721a commit 098b209
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions docs/usage/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ a basic example:
- when request:
- select:
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- first
- finalize:
cacheDuration: PT12H
validUntil: P10D
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand All @@ -75,7 +75,7 @@ a basic example:
Lets pick this pipeline apart. First notice the two *when* instructions. The :ref:`pyff.builtins:when` pipe is used to
conditionally execute a set of instructions. There is essentially only one type of condition. When processing a pipeline
pyFF keeps a state variable (a dict-like object) which changes as the instructions are processed. When the pipeline is
launched the state is initialized with a a set of key-value pairs used to control execution of the pipeline.
launched the state is initialized with a set of key-value pairs used to control execution of the pipeline.

There are a few pre-defined states, in this case we're dealing with two: the execution mode `update` or `request` (we'll
get to that one later) or the `accept` state used to implement content negotiation in the pyFF wsgi app. In fact there are
Expand Down Expand Up @@ -109,7 +109,7 @@ appear to have no parameters, is actually "fed" from the request processing of p

The subsequent calls to `when` implements content negotiation to provide a discojuice and XML version of the
metadata depending on what the caller is asking for. This is key to using pyFF as a backend to the thiss.io discovery
service for instance.
service. More than one content type may be specified to accommodate noncompliant MDQ clients.

The rest of the XML "branch" of the pipeline should be pretty easy to understand. First we use the
:py:func:`pyff.builtins.first` pipe to ensure that we only return a single EntityDescriptor if our select
Expand Down
4 changes: 2 additions & 2 deletions examples/edugain-copy.fd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- when request:
- select
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- pipe:
- when path /md/swamid-kalmar-1.0:
- xslt:
Expand All @@ -34,7 +34,7 @@
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand Down
4 changes: 2 additions & 2 deletions examples/edugain-mdq.fd
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
- when request:
- select:
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- first
- finalize:
cacheDuration: PT12H
validUntil: P10D
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand Down
4 changes: 2 additions & 2 deletions examples/eidas.fd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- when request:
- select
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- xslt:
stylesheet: tidy.xsl
- first
Expand All @@ -26,7 +26,7 @@
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand Down
4 changes: 2 additions & 2 deletions examples/mdx.fd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
- when request:
- select
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- pipe:
- when path /md/swamid-kalmar-1.0:
- xslt:
Expand All @@ -56,7 +56,7 @@
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand Down
4 changes: 2 additions & 2 deletions examples/met.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- when request:
- select
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- xslt:
stylesheet: tidy.xsl
- pubinfo:
Expand All @@ -54,7 +54,7 @@
- sign:
key: default.key
cert: default.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- xslt:
Expand Down
4 changes: 2 additions & 2 deletions examples/ndn.fd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- when request:
- select
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- xslt:
stylesheet: tidy.xsl
- first
Expand All @@ -28,7 +28,7 @@
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand Down
4 changes: 2 additions & 2 deletions examples/new-renater.fd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- when request:
- select
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- xslt:
stylesheet: tidy.xsl
- first
Expand All @@ -16,7 +16,7 @@
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand Down
4 changes: 2 additions & 2 deletions examples/test.fd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- when request:
- select
- pipe:
- when accept application/xml:
- when accept application/samlmetadata+xml application/xml:
- pipe:
- when path /md/swamid-kalmar-1.0:
- xslt:
Expand All @@ -41,7 +41,7 @@
- sign:
key: sign.key
cert: sign.crt
- emit application/xml
- emit application/samlmetadata+xml
- break
- when accept application/json:
- discojson
Expand Down

0 comments on commit 098b209

Please sign in to comment.