File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
abstract class AbstractAuthorizationHeader implements HeaderInterface
6
6
{
7
- public abstract function withCredentials (string $ credentials );
8
7
public static abstract function getAuthorizationType () : string ;
8
+ public abstract function withCredentials (string $ credentials );
9
+ public abstract function getCredentials () : string ;
10
+ public function getType () : string
11
+ {
12
+ return static ::getAuthorizationType ();
13
+ }
9
14
}
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ public function withCredentials(string $credentials)
23
23
$ new ->password = $ parts [1 ];
24
24
return $ new ;
25
25
}
26
+ public function getCredentials (): string
27
+ {
28
+ return $ this ->user . ': ' . $ this ->password ;
29
+ }
26
30
27
31
public function withUser (string $ user )
28
32
{
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ public function withCredentials(string $credentials)
15
15
$ new ->token = $ credentials ;
16
16
return $ new ;
17
17
}
18
+ public function getCredentials (): string
19
+ {
20
+ return $ this ->token ;
21
+ }
18
22
public function withToken (string $ token )
19
23
{
20
24
$ new = clone $ this ;
You can’t perform that action at this time.
0 commit comments