Skip to content

Commit 93fdd28

Browse files
committed
Add safeguard for base URIs with trailing "/"
1 parent 8386304 commit 93fdd28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Classes/OAuthClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ abstract public function getClientId(): string;
148148
*/
149149
public function getAccessTokenUri(): string
150150
{
151-
return $this->getBaseUri() . '/oauth/token';
151+
return trim($this->getBaseUri(), '/') . '/oauth/token';
152152
}
153153

154154
/**
@@ -159,7 +159,7 @@ public function getAccessTokenUri(): string
159159
*/
160160
public function getAuthorizeTokenUri(): string
161161
{
162-
return $this->getBaseUri() . '/oauth/token/authorize';
162+
return trim($this->getBaseUri(), '/') . '/oauth/token/authorize';
163163
}
164164

165165
/**
@@ -170,7 +170,7 @@ public function getAuthorizeTokenUri(): string
170170
*/
171171
public function getResourceOwnerUri(): string
172172
{
173-
return $this->getBaseUri() . '/oauth/token/resource';
173+
return trim($this->getBaseUri(), '/') . '/oauth/token/resource';
174174
}
175175

176176
/**

0 commit comments

Comments
 (0)