You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
1
STACK-2 Authentication Middlewares
2
2
==================================
3
3
4
-
A collection of [Stack][0] middlewares designed to help Stack Authentication middleware implementors adhere to the [STACK-2 Authentication][1] conventions.
4
+
A collection of [Stack][0] middlewares designed to help Stack Authentication
5
+
middleware implementors adhere to the [STACK-2 Authentication][1] conventions.
5
6
6
7
7
8
Installation
@@ -15,11 +16,16 @@ Middlewares
15
16
16
17
### Authentication Middleware
17
18
18
-
The Authentication middleware takes care of setting up the handling of an inbound request by taking care of some [STACK-2 Authentication][2] housekeeping tasks:
19
+
The Authentication middleware takes care of setting up the handling of an
20
+
inbound request by taking care of some [STACK-2 Authentication][2] housekeeping
21
+
tasks:
19
22
20
-
* If the `stack.authn.token` is set, it wraps the application in `WwwAuthenticateStackChallenge` and delegates.
21
-
* If the there is an `authorization` header, it returns the result of then **authenticate** callback.
22
-
* If anonymous requests are received and anonymous requests are allowed, it wraps the application in `WwwAuthenticateStackChallenge` and delegates.
23
+
* If the `stack.authn.token` is set, it wraps the application in
24
+
`WwwAuthenticateStackChallenge` and delegates.
25
+
* If the there is an `authorization` header, it returns the result of then
26
+
**authenticate** callback.
27
+
* If anonymous requests are received and anonymous requests are allowed, it
28
+
wraps the application in `WwwAuthenticateStackChallenge` and delegates.
23
29
* Otherwise, it returns the result of the **challenge** callback.
24
30
25
31
#### Usage
@@ -71,9 +77,12 @@ return (new Authentication($app, [
71
77
72
78
### WwwAuthenticateStackChallenge Middleware
73
79
74
-
The WwwAuthenticateStackChallenge middleware takes care of setting up the handling of an outbound response by taking care of some [STACK-2 Authentication][2] housekeeping tasks:
80
+
The WwwAuthenticateStackChallenge middleware takes care of setting up the
81
+
handling of an outbound response by taking care of some
82
+
[STACK-2 Authentication][2] housekeeping tasks:
75
83
76
-
* If the response has a 401 status code and has a WWW-Authenticate header with the value of Stack, it returns the result of the **challenge** callback.
84
+
* If the response has a 401 status code and has a WWW-Authenticate header with
85
+
the value of Stack, it returns the result of the **challenge** callback.
77
86
* Otherwise the original response from the delegated app is returned.
78
87
79
88
@@ -111,7 +120,8 @@ MIT, see LICENSE.
111
120
Community
112
121
---------
113
122
114
-
If you have questions or want to help out, join us in **#stackphp** or **#dflydev** channels on **irc.freenode.net**.
123
+
If you have questions or want to help out, join us in the **#stackphp** or
0 commit comments