@@ -259,7 +259,7 @@ class OpenIDConnectClient
259259 * @param string|null $client_secret optional
260260 * @param string|null $issuer
261261 */
262- public function __construct (string $ provider_url = null , string $ client_id = null , string $ client_secret = null , string $ issuer = null ) {
262+ public function __construct (? string $ provider_url = null , ? string $ client_id = null , ? string $ client_secret = null , ? string $ issuer = null ) {
263263 $ this ->setProviderURL ($ provider_url );
264264 if ($ issuer === null ) {
265265 $ this ->setIssuer ($ provider_url );
@@ -1189,7 +1189,7 @@ protected function validateIssuer(string $iss): bool
11891189 * @return bool
11901190 * @throws OpenIDConnectClientException
11911191 */
1192- protected function verifyJWTClaims ($ claims , string $ accessToken = null ): bool
1192+ protected function verifyJWTClaims ($ claims , ? string $ accessToken = null ): bool
11931193 {
11941194 if (isset ($ claims ->at_hash , $ accessToken )) {
11951195 if (isset ($ this ->getIdTokenHeader ()->alg ) && $ this ->getIdTokenHeader ()->alg !== 'none ' ) {
@@ -1258,7 +1258,7 @@ protected function decodeJWT(string $jwt, int $section = 0) {
12581258 *
12591259 * @throws OpenIDConnectClientException
12601260 */
1261- public function requestUserInfo (string $ attribute = null ) {
1261+ public function requestUserInfo (? string $ attribute = null ) {
12621262
12631263 $ user_info_endpoint = $ this ->getProviderConfigValue ('userinfo_endpoint ' );
12641264
@@ -1332,7 +1332,7 @@ public function requestUserInfo(string $attribute = null) {
13321332 * @return mixed
13331333 *
13341334 */
1335- public function getVerifiedClaims (string $ attribute = null ) {
1335+ public function getVerifiedClaims (? string $ attribute = null ) {
13361336
13371337 if ($ attribute === null ) {
13381338 return $ this ->verifiedClaims ;
@@ -1352,7 +1352,7 @@ public function getVerifiedClaims(string $attribute = null) {
13521352 * @return bool|string
13531353 * @throws OpenIDConnectClientException
13541354 */
1355- protected function fetchURL (string $ url , string $ post_body = null , array $ headers = []) {
1355+ protected function fetchURL (string $ url , ? string $ post_body = null , array $ headers = []) {
13561356
13571357 // OK cool - then let's create a new cURL resource handle
13581358 $ ch = curl_init ();
@@ -1626,7 +1626,7 @@ public function register() {
16261626 * @throws OpenIDConnectClientException
16271627 * @throws Exception
16281628 */
1629- public function introspectToken (string $ token , string $ token_type_hint = '' , string $ clientId = null , string $ clientSecret = null ) {
1629+ public function introspectToken (string $ token , string $ token_type_hint = '' , ? string $ clientId = null , ? string $ clientSecret = null ) {
16301630 $ introspection_endpoint = $ this ->getProviderConfigValue ('introspection_endpoint ' );
16311631 $ token_endpoint_auth_methods_supported = $ this ->getProviderConfigValue ('token_endpoint_auth_methods_supported ' , ['client_secret_basic ' ]);
16321632
@@ -1667,7 +1667,7 @@ public function introspectToken(string $token, string $token_type_hint = '', str
16671667 * @return mixed
16681668 * @throws OpenIDConnectClientException
16691669 */
1670- public function revokeToken (string $ token , string $ token_type_hint = '' , string $ clientId = null , string $ clientSecret = null ) {
1670+ public function revokeToken (string $ token , string $ token_type_hint = '' , ? string $ clientId = null , ? string $ clientSecret = null ) {
16711671 $ revocation_endpoint = $ this ->getProviderConfigValue ('revocation_endpoint ' );
16721672
16731673 $ post_data = ['token ' => $ token ];
0 commit comments