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 44
55abstract class AbstractAuthorizationHeader implements HeaderInterface
66{
7- public abstract function withCredentials (string $ credentials );
87 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+ }
914}
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ public function withCredentials(string $credentials)
2323 $ new ->password = $ parts [1 ];
2424 return $ new ;
2525 }
26+ public function getCredentials (): string
27+ {
28+ return $ this ->user . ': ' . $ this ->password ;
29+ }
2630
2731 public function withUser (string $ user )
2832 {
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ public function withCredentials(string $credentials)
1515 $ new ->token = $ credentials ;
1616 return $ new ;
1717 }
18+ public function getCredentials (): string
19+ {
20+ return $ this ->token ;
21+ }
1822 public function withToken (string $ token )
1923 {
2024 $ new = clone $ this ;
You can’t perform that action at this time.
0 commit comments