Skip to content

Commit f5c18a1

Browse files
committed
Update namespace
1 parent 14171e7 commit f5c18a1

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/components/authentication.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ $authentication->authenticate($request);
2828
### Basic Auth
2929

3030
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.
3232

3333
``` php
34-
use Http\Authentication\BasicAuth;
34+
use Http\Message\Authentication\BasicAuth;
3535

3636
$authentication = new BasicAuth('username', 'password');
3737

@@ -47,7 +47,7 @@ $authentication->setPassword('password');
4747
This authentication method accepts one parameter: a token.
4848

4949
``` php
50-
use Http\Authentication\Bearer;
50+
use Http\Message\Authentication\Bearer;
5151

5252
$authentication = new Bearer('token');
5353

@@ -68,7 +68,7 @@ to protect the API from unnecessary processing.
6868

6969

7070
``` php
71-
use Http\Authentication\Chain;
71+
use Http\Message\Authentication\Chain;
7272

7373
$authenticationChain = [
7474
new AuthenticationMethod1(),
@@ -102,7 +102,7 @@ For example a common use case is to authenticate requests sent to certain paths.
102102

103103

104104
``` php
105-
use Http\Authentication\Mathing;
105+
use Http\Message\Authentication\Mathing;
106106

107107
$authentication = new Mathing(new AuthenticationMethod1(), function () { return true; });
108108

@@ -117,19 +117,20 @@ The first argument is an authentication method, the second is a regexp to match
117117

118118

119119
``` php
120-
use Http\Authentication\Mathing;
120+
use Http\Message\Authentication\Mathing;
121121

122122
$authentication = Matching::createUrlMatcher(new AuthenticationMethod(), '\/api');
123123
```
124124

125+
125126
### WSSE
126127

127128
This method implements [WSSE Authentication](http://www.xml.com/pub/a/2003/12/17/dive.html).
128129
Just like Basic Auth, it also accepts a username-password pair and exposes the same methods as well.
129130

130131

131132
``` php
132-
use Http\Authentication\Wsse;
133+
use Http\Message\Authentication\Wsse;
133134

134135
$authentication = new Wsse('username', 'password');
135136
```
@@ -140,7 +141,7 @@ $authentication = new Wsse('username', 'password');
140141
Implementing an authentication method is easy: only one method needs to be implemented.
141142

142143
``` php
143-
use Http\Authentication\Authentication;
144+
use Http\Message\Authentication\Authentication;
144145
use Psr\Http\Message\RequestInterface;
145146

146147
class MyAuth implements Authentication

0 commit comments

Comments
 (0)