mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[feature/oauth] Clean up documentation
PHPBB3-11673
This commit is contained in:
@@ -87,7 +87,7 @@ interface phpbb_auth_provider_interface
|
|||||||
* )
|
* )
|
||||||
* An optional third element may be added to this
|
* An optional third element may be added to this
|
||||||
* array: 'BLOCK_VAR_NAME'. If this is present,
|
* array: 'BLOCK_VAR_NAME'. If this is present,
|
||||||
* then it's value should be a string that is used
|
* then its value should be a string that is used
|
||||||
* to designate the name of the loop used in the
|
* to designate the name of the loop used in the
|
||||||
* ACP template file. In addition to this, an
|
* ACP template file. In addition to this, an
|
||||||
* additional key named 'BLOCK_VARS' is required.
|
* additional key named 'BLOCK_VARS' is required.
|
||||||
|
@@ -70,13 +70,13 @@ class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oau
|
|||||||
throw new Exception('Invalid service provider type');
|
throw new Exception('Invalid service provider type');
|
||||||
}
|
}
|
||||||
|
|
||||||
// This was a callback request from bitly, get the token
|
// This was a callback request, get the token
|
||||||
$this->service_provider->requestAccessToken( $this->request->variable('code', '') );
|
$this->service_provider->requestAccessToken( $this->request->variable('code', '') );
|
||||||
|
|
||||||
// Send a request with it
|
// Send a request with it
|
||||||
$result = json_decode( $this->service_provider->request('/me'), true );
|
$result = json_decode( $this->service_provider->request('/me'), true );
|
||||||
|
|
||||||
// Return the unique identifier returned from bitly
|
// Return the unique identifier
|
||||||
return $result['id'];
|
return $result['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oau
|
|||||||
// Send a request with it
|
// Send a request with it
|
||||||
$result = json_decode( $this->service_provider->request('/me'), true );
|
$result = json_decode( $this->service_provider->request('/me'), true );
|
||||||
|
|
||||||
// Return the unique identifier returned from bitly
|
// Return the unique identifier
|
||||||
return $result['id'];
|
return $result['id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -87,7 +87,7 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
|
|||||||
// Send a request with it
|
// Send a request with it
|
||||||
$result = json_decode( $this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true );
|
$result = json_decode( $this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true );
|
||||||
|
|
||||||
// Return the unique identifier returned from bitly
|
// Return the unique identifier
|
||||||
return $result['id'];
|
return $result['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
|
|||||||
// Send a request with it
|
// Send a request with it
|
||||||
$result = json_decode( $this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true );
|
$result = json_decode( $this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true );
|
||||||
|
|
||||||
// Return the unique identifier returned from bitly
|
// Return the unique identifier
|
||||||
return $result['id'];
|
return $result['id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user