File tree 3 files changed +14
-21
lines changed
3 files changed +14
-21
lines changed Original file line number Diff line number Diff line change 4
4
use Authwave \ProviderUri \AbstractProviderUri ;
5
5
use Authwave \ProviderUri \AdminUri ;
6
6
use Authwave \ProviderUri \AuthUri ;
7
+ use Authwave \ProviderUri \ProfileUri ;
7
8
use Gt \Http \Uri ;
8
9
use Gt \Session \SessionContainer ;
9
10
use Psr \Http \Message \UriInterface ;
@@ -123,22 +124,12 @@ public function getAuthUri(
123
124
);
124
125
}
125
126
126
- public function getAdminUri (
127
- string $ path = AdminUri::PATH_ADMIN
128
- ):UriInterface {
129
- return new AdminUri (
130
- $ this ->authwaveHost ,
131
- $ path
132
- );
127
+ public function getAdminUri ():UriInterface {
128
+ return new AdminUri ($ this ->authwaveHost );
133
129
}
134
130
135
- public function getProfileUri (
136
- string $ path = ProfileUri::PATH_PROFILE
137
- ):UriInterface {
138
- return new ProfileUri (
139
- $ this ->authwaveHost ,
140
- $ path
141
- );
131
+ public function getProfileUri ():UriInterface {
132
+ return new ProfileUri ($ this ->authwaveHost );
142
133
}
143
134
144
135
private function completeAuth ():void {
Original file line number Diff line number Diff line change 2
2
namespace Authwave \ProviderUri ;
3
3
4
4
class AdminUri extends AbstractProviderUri {
5
- const PATH_ADMIN = "/admin " ;
6
- const PATH_SETTINGS = "/settings " ;
7
-
8
5
public function __construct (
9
- string $ baseRemoteUri ,
10
- string $ path
6
+ string $ baseRemoteUri
11
7
) {
12
8
$ baseRemoteUri = $ this ->normaliseBaseUri ($ baseRemoteUri );
13
9
parent ::__construct ($ baseRemoteUri );
14
- $ this ->path = $ path ;
10
+ $ this ->path = " /admin " ;
15
11
}
16
12
}
Original file line number Diff line number Diff line change 2
2
namespace Authwave \ProviderUri ;
3
3
4
4
class ProfileUri extends AbstractProviderUri {
5
-
5
+ public function __construct (
6
+ string $ baseRemoteUri
7
+ ) {
8
+ $ baseRemoteUri = $ this ->normaliseBaseUri ($ baseRemoteUri );
9
+ parent ::__construct ($ baseRemoteUri );
10
+ $ this ->path = "/profile " ;
11
+ }
6
12
}
You can’t perform that action at this time.
0 commit comments