Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Latest commit

 

History

History
197 lines (142 loc) · 7.12 KB

OIDCClientsApi.md

File metadata and controls

197 lines (142 loc) · 7.12 KB

OpenEuropa\SyncopePhpClient\OIDCClientsApi

All URIs are relative to http://syncope-vm.apache.org:9080/syncope/rest

Method HTTP request Description
createLoginRequest POST /oidcclient/clients/loginRequest Generates OpenID Connect authentication request for the Provider matching the provided op.
createLogoutRequest POST /oidcclient/clients/logout Returns the endSession endpoint for the provided op.
login1 POST /oidcclient/clients/login Uses the provided authorization code to go through the OpenID Connect tokens process and finally creates JWT for the matching user, if found.

createLoginRequest

createLoginRequest($xSyncopeDomain, $redirectUri, $op)

Generates OpenID Connect authentication request for the Provider matching the provided op.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\OIDCClientsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$xSyncopeDomain = 'Master'; // string | 
$redirectUri = 'redirectUri_example'; // string | redirect URI
$op = 'op_example'; // string | OpenID Connect Provider

try {
    $apiInstance->createLoginRequest($xSyncopeDomain, $redirectUri, $op);
} catch (Exception $e) {
    echo 'Exception when calling OIDCClientsApi->createLoginRequest: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
xSyncopeDomain string [default to 'Master']
redirectUri string redirect URI [optional]
op string OpenID Connect Provider [optional]

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createLogoutRequest

createLogoutRequest($xSyncopeDomain, $op)

Returns the endSession endpoint for the provided op.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\OIDCClientsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$xSyncopeDomain = 'Master'; // string | 
$op = 'op_example'; // string | OpenID Connect Provider

try {
    $apiInstance->createLogoutRequest($xSyncopeDomain, $op);
} catch (Exception $e) {
    echo 'Exception when calling OIDCClientsApi->createLogoutRequest: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
xSyncopeDomain string [default to 'Master']
op string OpenID Connect Provider [optional]

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

login1

login1($xSyncopeDomain, $redirectUri, $authorizationCode, $op)

Uses the provided authorization code to go through the OpenID Connect tokens process and finally creates JWT for the matching user, if found.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuthentication
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure HTTP basic authorization: Bearer
$config = OpenEuropa\SyncopePhpClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new OpenEuropa\SyncopePhpClient\Api\OIDCClientsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$xSyncopeDomain = 'Master'; // string | 
$redirectUri = 'redirectUri_example'; // string | redirect URI
$authorizationCode = 'authorizationCode_example'; // string | authorization code generated by the remote OpenID Connect Provider
$op = 'op_example'; // string | OpenID Connect Provider

try {
    $apiInstance->login1($xSyncopeDomain, $redirectUri, $authorizationCode, $op);
} catch (Exception $e) {
    echo 'Exception when calling OIDCClientsApi->login1: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
xSyncopeDomain string [default to 'Master']
redirectUri string redirect URI [optional]
authorizationCode string authorization code generated by the remote OpenID Connect Provider [optional]
op string OpenID Connect Provider [optional]

Return type

void (empty response body)

Authorization

BasicAuthentication, Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/yaml, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]