@@ -28,10 +28,10 @@ $authentication->authenticate($request);
28
28
### Basic Auth
29
29
30
30
This authentication method accepts two parameters: username and password. Getters/Setters are provided by
31
- ` Http\Authentication\UserPasswordPair ` trait.
31
+ ` Http\Message\ Authentication\UserPasswordPair ` trait.
32
32
33
33
``` php
34
- use Http\Authentication\BasicAuth;
34
+ use Http\Message\ Authentication\BasicAuth;
35
35
36
36
$authentication = new BasicAuth('username', 'password');
37
37
@@ -47,7 +47,7 @@ $authentication->setPassword('password');
47
47
This authentication method accepts one parameter: a token.
48
48
49
49
``` php
50
- use Http\Authentication\Bearer;
50
+ use Http\Message\ Authentication\Bearer;
51
51
52
52
$authentication = new Bearer('token');
53
53
@@ -68,7 +68,7 @@ to protect the API from unnecessary processing.
68
68
69
69
70
70
``` php
71
- use Http\Authentication\Chain;
71
+ use Http\Message\ Authentication\Chain;
72
72
73
73
$authenticationChain = [
74
74
new AuthenticationMethod1(),
@@ -102,7 +102,7 @@ For example a common use case is to authenticate requests sent to certain paths.
102
102
103
103
104
104
``` php
105
- use Http\Authentication\Mathing;
105
+ use Http\Message\ Authentication\Mathing;
106
106
107
107
$authentication = new Mathing(new AuthenticationMethod1(), function () { return true; });
108
108
@@ -117,19 +117,20 @@ The first argument is an authentication method, the second is a regexp to match
117
117
118
118
119
119
``` php
120
- use Http\Authentication\Mathing;
120
+ use Http\Message\ Authentication\Mathing;
121
121
122
122
$authentication = Matching::createUrlMatcher(new AuthenticationMethod(), '\/api');
123
123
```
124
124
125
+
125
126
### WSSE
126
127
127
128
This method implements [ WSSE Authentication] ( http://www.xml.com/pub/a/2003/12/17/dive.html ) .
128
129
Just like Basic Auth, it also accepts a username-password pair and exposes the same methods as well.
129
130
130
131
131
132
``` php
132
- use Http\Authentication\Wsse;
133
+ use Http\Message\ Authentication\Wsse;
133
134
134
135
$authentication = new Wsse('username', 'password');
135
136
```
@@ -140,7 +141,7 @@ $authentication = new Wsse('username', 'password');
140
141
Implementing an authentication method is easy: only one method needs to be implemented.
141
142
142
143
``` php
143
- use Http\Authentication\Authentication;
144
+ use Http\Message\ Authentication\Authentication;
144
145
use Psr\Http\Message\RequestInterface;
145
146
146
147
class MyAuth implements Authentication
0 commit comments