PHP Class PayPal\Api\OpenIdSession

Mostra file Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Methods

Method Description
getAuthorizationUrl ( string $redirectUri, array $scope, string $clientId, null $nonce = null, null $state = null, ApiContext $apiContext = null ) : string Returns the PayPal URL to which the user must be redirected to start the authentication / authorization process.
getLogoutUrl ( string $redirectUri, string $idToken, ApiContext $apiContext = null ) : string Returns the URL to which the user must be redirected to logout from the OpenID provider (i.e. PayPal)

Private Methods

Method Description
getBaseUrl ( $config ) : null | string Gets the base URL for the Redirect URI

Method Details

getAuthorizationUrl() public static method

Returns the PayPal URL to which the user must be redirected to start the authentication / authorization process.
public static getAuthorizationUrl ( string $redirectUri, array $scope, string $clientId, null $nonce = null, null $state = null, ApiContext $apiContext = null ) : string
$redirectUri string Uri on merchant website to where the user must be redirected to post paypal login
$scope array The access privilges that you are requesting for from the user. Pass empty array for all scopes.
$clientId string client id from developer portal See https://developer.paypal.com/webapps/developer/docs/integration/direct/log-in-with-paypal/detailed/#attributes for more
$nonce null
$state null
$apiContext PayPal\Rest\ApiContext Optional API Context
return string Authorization URL

getLogoutUrl() public static method

Returns the URL to which the user must be redirected to logout from the OpenID provider (i.e. PayPal)
public static getLogoutUrl ( string $redirectUri, string $idToken, ApiContext $apiContext = null ) : string
$redirectUri string Uri on merchant website to where the user must be redirected to post logout
$idToken string id_token from the TokenInfo object
$apiContext PayPal\Rest\ApiContext Optional API Context
return string logout URL