Skip to content

Latest commit

 

History

History
98 lines (64 loc) · 2.89 KB

OpenidconnectApi.md

File metadata and controls

98 lines (64 loc) · 2.89 KB

Ory\Hydra\OpenidconnectApi

All URIs are relative to http://localhost

Method HTTP request Description
wellKnown GET /.well-known/jwks.json Public JWKs
wellKnownHandler GET /.well-known/openid-configuration Server well known configuration

wellKnown

\Ory\Hydra\Model\JwkSet wellKnown()

Public JWKs

Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. The subject making the request needs to be assigned to a policy containing: { \"resources\": [\"rn:hydra:keys:hydra.openid.id-token:public\"], \"actions\": [\"GET\"], \"effect\": \"allow\" }

Example

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

// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Ory\Hydra\Api\OpenidconnectApi(new \Http\Adapter\Guzzle6\Client());

try {
    $result = $api_instance->wellKnown();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OpenidconnectApi->wellKnown: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Ory\Hydra\Model\JwkSet

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

wellKnownHandler

\Ory\Hydra\Model\WellKnown wellKnownHandler()

Server well known configuration

For more information, please refer to https://openid.net/specs/openid-connect-discovery-1_0.html

Example

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

// Configure OAuth2 access token for authorization: oauth2
Ory\Hydra\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Ory\Hydra\Api\OpenidconnectApi(new \Http\Adapter\Guzzle6\Client());

try {
    $result = $api_instance->wellKnownHandler();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OpenidconnectApi->wellKnownHandler: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Ory\Hydra\Model\WellKnown

Authorization

oauth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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