<?xml 
version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
>

<channel xml:lang="fr">
	<title>OpenID Connect OAuth Server d&#233;di&#233; </title>
	<link>https://oa.dnc.global/</link>
	<description>OAuth Server by DnC (OAuthSD) est un serveur d'authentification qui impl&#233;mente OAuth 2.0 et OpenID Connect.
Avec la connexion unique, une entit&#233; permet aux utilisateurs de ses applications de naviguer de l'une &#224; l'autre de fa&#231;on trans-parente. En centralisant l'authentification des applications et des utilisateurs, un serveur OpenID Connect permet de contr&#244;ler parfaitement l'acc&#232;s des applications et des utilisateurs aux informations sensibles.</description>
	<language>fr</language>
	<generator>SPIP - www.spip.net</generator>

	<image>
		<title>&lt;small&gt;OpenID Connect&lt;/small&gt; OAuth Server &lt;small&gt; d&#233;di&#233; &lt;/small&gt;</title>
		<url>https://static.oa.dnc.global/local/cache-vignettes/L144xH126/siteon0-a21bf.png?1733820003</url>
		<link>https://oa.dnc.global/</link>
		<height>126</height>
		<width>144</width>
	</image>



<item xml:lang="fr">
		<title>API Open ID Connect : Introspection (Introspection Endpoint)</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectintrospectionintrospectionendpoint</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectintrospectionintrospectionendpoint</guid>
		<dc:date>2021-04-15T08:15:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;L'introspection permet &#224; une application cliente ou &#224; un serveur de ressource (RS) de valider un jeton aupr&#232;s du serveur d'authentification (AS) . &lt;br class='autobr' /&gt;
Les jetons soumis peuvent &#234;tre du type Access Token, Identity Token (JWT) ou Json Web Encryption (JWE). Impl&#233;mentation de l'Introspection &lt;br class='autobr' /&gt;
Il n'y a pas (&#224; ce jour) de &#034;norme&#034; d&#233;finissant l'Introspection pour OpenID Connect. Cependant, OAuthSD, ainsi que les impl&#233;mentations courantes, se fonde sur la proposition de standard RFC 7662 : OAuth 2.0 Token (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L128xH128/arton54-a2dc1.png?1733821221' width='128' height='128' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;L'introspection permet &#224; une application cliente ou &#224; un serveur de ressource (RS) de valider un jeton aupr&#232;s du serveur d'authentification (AS) .&lt;/p&gt;
&lt;p&gt;Les jetons soumis peuvent &#234;tre du type &lt;a href='https://static.oa.dnc.global/-Gestion-du-jeton-d-acces-.html' class='spip_in'&gt;Access Token&lt;/a&gt;, &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jsonwebtokenjwt' class='spip_in'&gt;Identity Token (JWT)&lt;/a&gt; ou &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jwejsonwebencryption' class='spip_in'&gt;Json Web Encryption (JWE)&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Impl&#233;mentation de l'Introspection&lt;/h3&gt;
&lt;p&gt;Il n'y a pas (&#224; ce jour) de &#034;norme&#034; d&#233;finissant l'Introspection pour OpenID Connect. Cependant, OAuthSD, ainsi que les impl&#233;mentations courantes, se fonde sur la proposition de standard &lt;a href=&#034;https://tools.ietf.org/html/rfc7662&#034; class='spip_out' rel='external'&gt;RFC 7662 : OAuth 2.0 Token Introspection&lt;/a&gt;. DnC a propos&#233; une fonction d'&lt;a href=&#034;https://github.com/bshaffer/oauth2-server-php/pull/964&#034; class='spip_out' rel='external'&gt;introspection pour la biblioth&#232;que OAuth 2.0 PHP&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Proposition de standard RFC 7662&lt;/h3&gt;
&lt;p&gt;&lt;i&gt;Traduction d'un extrait du document &lt;a href=&#034;https://tools.ietf.org/html/rfc7662&#034; class='spip_out' rel='external'&gt;RFC 7662 : OAuth 2.0 Token Introspection&lt;/a&gt;&lt;/i&gt;&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;
2.2. R&#233;ponse d'introspection&lt;/p&gt;
&lt;p&gt; Le serveur r&#233;pond avec un objet JSON [RFC7159] dans le format &#034;application/json &#034;avec les membres de niveau sup&#233;rieur suivants.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;active&lt;/strong&gt;&lt;br class='autobr' /&gt;
CHAMPS OBLIGATOIRE. bool&#233;en indiquant si le jeton pr&#233;sent&#233; est actuellement actif ou non. Les sp&#233;cificit&#233;s de l'&#233;tat &#034;actif&#034; d'un jeton variera en fonction de la mise en &#339;uvre du serveur d'autorisation et les informations qu'il conserve sur ses jetons, mais une &#034;vraie&#034;&lt;br class='autobr' /&gt;
valeur retourn&#233;e pour la propri&#233;t&#233; &#034;active&#034; indiquera g&#233;n&#233;ralement qu'un jeton donn&#233; a &#233;t&#233; &#233;mis par ce serveur d'autorisation, n'a pas &#233;t&#233; r&#233;voqu&#233; par le propri&#233;taire de la ressource et rel&#232;ve de sa fen&#234;tre de validit&#233; donn&#233;e (par exemple, apr&#232;s son heure d'&#233;mission et avant son heure d'expiration). Voir la section 4 pour des informations sur la mise en &#339;uvre de ces contr&#244;les.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;scope&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Une cha&#238;ne JSON contenant une liste de port&#233;es associ&#233;es &#224; ce jeton, dans le format d&#233;crit dans la Section 3.3 de OAuth 2.0 [RFC6749].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;client_id&lt;/strong&gt;&lt;br class='autobr' /&gt; OPTIONNEL. Identifiant de client pour le client OAuth 2.0 qui a demand&#233; ce jeton.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;username&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Identifiant lisible par l'homme pour le propri&#233;taire de la ressource qui a autoris&#233; ce jeton.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;token_type&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Type de jeton tel que d&#233;fini dans la section 5.1 de OAuth 2.0 [RFC6749].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;exp&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Horodatage entier, mesur&#233; en nombre de secondes depuis le 1er janvier 1970 UTC, en indiquant la date d'expiration de ce jeton, comme d&#233;fini dans JWT [RFC7519].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;iat&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Horodatage entier, mesur&#233; en nombre de secondes depuis le 1er janvier 1970 UTC, en indiquant quand ce jeton a &#233;t&#233; publi&#233; &#224; l'origine, tel que d&#233;fini dans JWT [RFC7519].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nbf&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Horodatage entier, mesur&#233; en nombre de secondes depuis le 1er janvier 1970 UTC, en indiquant quand ce jeton ne doit pas &#234;tre utilis&#233; auparavant, comme d&#233;fini dans JWT [RFC7519].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;sub&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Sujet du jeton, tel que d&#233;fini dans JWT [RFC7519].&lt;br class='autobr' /&gt;
G&#233;n&#233;ralement, un identifiant lisible par machine du propri&#233;taire de la ressource qui a autoris&#233; ce jeton.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;aud&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. cha&#238;ne Identifiant sp&#233;cifique au service ou liste de cha&#238;nes identifiants repr&#233;sentant le public vis&#233; pour ce jeton, comme d&#233;fini dans JWT [RFC7519].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;iss&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Cha&#238;ne repr&#233;sentant l'&#233;metteur de ce jeton, sous la forme d&#233;finie dans JWT [RFC7519].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;jti&lt;/strong&gt;&lt;br class='autobr' /&gt;
OPTIONNEL. Identificateur de cha&#238;ne pour le jeton, tel que d&#233;fini dans JWT [RFC7519].&lt;/p&gt;
&lt;p&gt;Des impl&#233;mentations sp&#233;cifiques PEUVENT &#233;tendre cette structure avec leurs propres noms de r&#233;ponse sp&#233;cifiques aux services en tant que membres de niveau sup&#233;rieur de cet objet JSON. Les noms de r&#233;ponse destin&#233;s &#224; &#234;tre utilis&#233;s sur plusieurs domaines DOIVENT &#234;tre inscrit dans le registre &#034;OAuth Token Introspection Response&#034; d&#233;fini &#224; la section 3.1.&lt;/p&gt;
&lt;p&gt;Le serveur d'autorisation PEUT r&#233;pondre diff&#233;remment &#224; diff&#233;rentes ressources prot&#233;g&#233;es faisant la m&#234;me demande. Par exemple, un serveur d'autorisation PEUT limiter les port&#233;es d'un jeton donn&#233; retourn&#233; pour chaque ressource prot&#233;g&#233;e pour emp&#234;cher une ressource prot&#233;g&#233;e d'en apprendre davantage sur le r&#233;seau que n&#233;cessaire pour son fonctionnement.&lt;/p&gt;
&lt;p&gt;La r&#233;ponse PEUT &#234;tre mise en cache par la ressource prot&#233;g&#233;e pour am&#233;liorer les performances et r&#233;duire la charge sur le point final d'introspection, mais au prix de la qualit&#233; de la validit&#233; des informations utilis&#233;es par la ressource prot&#233;g&#233;e pour prendre des d&#233;cisions d'autorisation. Voir la section 4 pour plus d'informations en ce qui concerne le compromis lorsque la r&#233;ponse est mise en cache.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;DnC s'est inspir&#233; de cette proposition de standard pour &#233;tendre les jetons accept&#233;s aux trois types &lt;a href='https://static.oa.dnc.global/-Gestion-du-jeton-d-acces-.html' class='spip_in'&gt;Access Token&lt;/a&gt;, &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jsonwebtokenjwt' class='spip_in'&gt;Identity Token (JWT)&lt;/a&gt; ou &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jwejsonwebencryption' class='spip_in'&gt;Json Web Encryption (JWE)&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Point d'extr&#233;mit&#233; d'introspection&lt;/h3&gt;
&lt;p&gt;Point d'extr&#233;mit&#233; d'introspection (Introspection Endpoint)&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;https://oa.dnc.global/introspect&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;a id=&#034;oidcformedemandeintrospection&#034;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Forme de la demande d'Introspection&lt;/h3&gt;
&lt;p&gt;La demande ne doit &#234;tre effectu&#233;e que par la m&#233;thode POST.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; OAuthSD ne n&#233;cessite pas l'enregistrement d'un scope r&#233;serv&#233; pour autoriser le client &#224; utiliser l'introspection, contrairement &#224; d'autres impl&#233;mentations. Le scope 'openid' est &#233;galement inutile, le controleur fonctionnant aussi bien dans le cadre de OAuth 2.0 que celui d'OpenID Connect.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contr&#244;le de l'acc&#232;s&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Les demandes adress&#233;es au point de terminaison d'introspection doivent &#234;tre authentifi&#233;es avec les informations d'identification du client (Client Credentials Grant) ou autoris&#233;es avec un jeton d'acc&#232;s au porteur (Bearer Token).&lt;br class='autobr' /&gt;
En cons&#233;quence, l'application appelante (ou le serveur de ressource) doit &#234;tre enregistr&#233;e comme cliente sur le serveur d'authentification&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Client Credentials Grant&lt;/strong&gt;&lt;br class='autobr' /&gt;
C'est l'approche la plus simple et celle qui est recommand&#233;e. &lt;br class='autobr' /&gt;
L'application appelante (ou le serveur de ressource) doit &#234;tre enregistr&#233;e comme cliente sur le serveur d'authentification&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-1' class='spip_note' rel='appendix' title='OAuthSD autorise tous les clients enregistr&#233;s &#224; acc&#233;der au point de (...)' id='nh2-1'&gt;1&lt;/a&gt;]&lt;/span&gt;.&lt;br class='autobr' /&gt;
L'authentification est effectu&#233;e en utilisant l'authentification HTTP Basic (cf. section 2.3.1 de OAuth 2.0 [RFC6749]). Les identifiants client_id et client_secret sont ceux qui ont &#233;t&#233; d&#233;finis lors de l'inscription de l'application cliente sur le serveur.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bearer Token&lt;/strong&gt;&lt;br class='autobr' /&gt;
Cette approche n&#233;cessite un jeton d'acc&#232;s pour autoriser la demande d'introspection. &lt;br class='autobr' /&gt;
Pour un serveur de ressource, cela est plus compliqu&#233; du fait de la dur&#233;e limit&#233;e de validit&#233; du jeton d'acc&#232;s, contraignant &#224; une nouvelle demande de jeton. Une fa&#231;on d'obtenir un tel jeton consiste &#224; inscrire l'application pour le flux &lt;a href='https://static.oa.dnc.global/-Autorisation-de-serveur-a-serveur-Client-Credentials-Grant-.html#oauth20autorisationdeserveuraserveurexemplecomplet' class='spip_in'&gt;Client Credential Grant&lt;/a&gt;. &lt;br class='autobr' /&gt;
L'authentification est effectu&#233;e en passant le jeton dans l'en-t&#234;te Authorization de la demande d'introspection.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; OAuthSD permet de sauter cette &#233;tape en r&#233;glant la constante de configuration AUTHENTICATE_INTROSPECT_REQUEST &#224; false.&lt;br class='autobr' /&gt;
De fait, la rfc indique que l'objectif de cette authentification client est &#034;Pour emp&#234;cher les attaques par balayage de jetons ...&#034;&lt;br class='autobr' /&gt;
Les attaques par balayage (scanning) pourraient &#234;tre mieux att&#233;nu&#233;es de certaines autres mani&#232;res, en particulier au niveau du r&#233;seau.&lt;br class='autobr' /&gt;
De plus, donner &#224; un client inconnu des informations sur la validit&#233; du jeton n'est pas un probl&#232;me de s&#233;curit&#233; &#233;lev&#233;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Requ&#234;te&lt;/h3&gt;
&lt;p&gt;Les param&#232;tre suivants doivent &#234;tre post&#233;s :&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;token&lt;/strong&gt; (OBLIGATOIRE) : le jeton &#224; valider. Les jetons soumis peuvent &#234;tre du type &lt;a href='https://static.oa.dnc.global/-Gestion-du-jeton-d-acces-.html' class='spip_in'&gt;Access Token&lt;/a&gt;, &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jsonwebtokenjwt' class='spip_in'&gt;Identity Token (JWT)&lt;/a&gt; ou &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jwejsonwebencryption' class='spip_in'&gt;Json Web Encryption (JWE)&lt;/a&gt;. &lt;br class='autobr' /&gt;
Si un jeton JWE est reconnu, il est d&#233;chiffr&#233; et le processus se poursuit avec la charge utile du JWE, qui n'est autre que le JWT.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;requester_ip&lt;/strong&gt; (OPTIONNEL) : Lorsque l'Introspection est demand&#233;e par une ressource prot&#233;g&#233;e (distincte de l'application cliente &#224; l'origine de l'authentification), il importe de ne pas r&#233;pondre &#224; un malware ayant intercept&#233; le jeton et tentant de le r&#233;-utiliser. &lt;br class='autobr' /&gt;
Pour cela, la ressource prot&#233;g&#233;e doit &lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#verificationdeloriginedelarequeterecueparunserveurderessource' class='spip_in'&gt;transmettre l'IP du demandeur au moyen du param&#232;tre 'requester_ip'&lt;/a&gt;.&lt;br class='autobr' /&gt;
La fonction d'introspection d'OAuthSD v&#233;rifie que l'IP indiqu&#233;e est celle qui a &#233;t&#233; enregistr&#233; avec l'application cliente ou, &#224; d&#233;faut, se trouve dans le sous r&#233;seau de l'application cliente tel qu'il peut &#234;tre d&#233;termin&#233; &#224; partir de l'URL de retour.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; OAuthSD ne n&#233;cessite pas le param&#232;tre token_type.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Avertissement &#224; propos du &lt;strong&gt;param&#232;tre 'alg'&lt;/strong&gt; : la RFC 7515, section 4.1.1 pr&#233;voit d'appliquer la valeur du param&#232;tre 'alg' pour le choix de l'algorithme de validation de la signature.&lt;br class='autobr' /&gt;
C'est une faille de s&#233;curit&#233; s&#233;v&#232;re, et donc une erreur de la sp&#233;cification. L'introspection d'OAuthSD applique la m&#233;thode d&#233;finie pour chaque application, avec laquelle les jetons sont sign&#233;s, quelle que soit la valeur de 'alg' et g&#233;n&#232;re une erreur si la valeur est diff&#233;rente.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;R&#233;ponse du serveur&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;En cas de succ&#232;s&lt;/strong&gt;, le serveur retourne une r&#233;ponse HTTP 200.&lt;/p&gt;
&lt;p&gt;Le corps de la r&#233;ponse contient un tableau portant les informations suivantes :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='ida5b2_c0'&gt; index &lt;/th&gt;&lt;th id='ida5b2_c1'&gt; type &lt;/th&gt;&lt;th id='ida5b2_c2'&gt; valeur &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='ida5b2_c0'&gt;status&lt;/td&gt;
&lt;td headers='ida5b2_c1'&gt;entier&lt;/td&gt;
&lt;td headers='ida5b2_c2'&gt;code HTTP&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td headers='ida5b2_c0'&gt;headers&lt;/td&gt;
&lt;td headers='ida5b2_c1'&gt;string&lt;/td&gt;
&lt;td headers='ida5b2_c2'&gt;Headers de la r&#233;ponse&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='ida5b2_c0'&gt;page&lt;/td&gt;
&lt;td headers='ida5b2_c1'&gt;string&lt;/td&gt;
&lt;td headers='ida5b2_c2'&gt;JSON Array :&lt;br class='autobr' /&gt;
active : true,&lt;br class='autobr' /&gt;
scope : (JSON string Array) scopes associ&#233;s au jeton.&lt;br class='autobr' /&gt;
client_id : ID de l'application cliente qui a demand&#233; ce jeton.&lt;br class='autobr' /&gt;
username : ID OAuth de l'utilisateur final (human-readable).&lt;br class='autobr' /&gt;
exp : (long) (secondes depuis le 1&#176; janvier 1970). Unix Time de la fin de validit&#233; du jeton.&lt;br class='autobr' /&gt;
iat : (long) (secondes depuis le 1&#176; janvier 1970). Unix Time de cr&#233;ation du jeton&lt;br class='autobr' /&gt;
iss : (string) issuer : serveur d'authentification qui a diffus&#233; ce jeton.&lt;br class='autobr' /&gt;
sub : identifiant interne de l'utilisateur qui a autoris&#233; ce jeton.&lt;br class='autobr' /&gt;
aud : audience d&#233;finie pour ce jeton.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Si le jeton n'est pas valide&lt;/strong&gt;, alors que la requ&#234;te n'a pas &#233;chou&#233;, l'introspection ne retourne un code HTTP 200 et une r&#233;ponse active : false.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Le traitement des erreurs d'introspection d&#233;crit dans ce qui suit est propre &#224; cette version de OAuthSD, destin&#233;e au d&#233;veloppement et &#224; la mise au point d'une application mettant en oeuvre la d&#233;l&#233;gation d'authentification. Conform&#233;ment &#224; la sp&#233;cification, les serveurs OAuthSD de production ne donnent pas de d&#233;tail sur l'erreur, mais retournent simplement un code HTTP 401 et une r&#233;ponse active : false.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;En cas d'&#233;chec de la requ&#234;te&lt;/strong&gt;, le corps de la r&#233;ponse contient :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='id6d2b_c0'&gt; index &lt;/th&gt;&lt;th id='id6d2b_c1'&gt; type &lt;/th&gt;&lt;th id='id6d2b_c2'&gt; valeur &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='id6d2b_c0'&gt;page&lt;/td&gt;
&lt;td headers='id6d2b_c1'&gt;string&lt;/td&gt;
&lt;td headers='id6d2b_c2'&gt;JSON Array :&lt;br class='autobr' /&gt;
error : titre de l'erreur,&lt;br class='autobr' /&gt;
error_description : description de l'erreur&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;La r&#233;ponse HTTP ainsi que les valeurs de error et error_description sont donn&#233;es par le tableau suivant :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;&lt;strong&gt;R&#233;ponse&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;error&lt;br class='autobr' /&gt;
titre de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;error_description&lt;br class='autobr' /&gt;
description de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Explication&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_request&lt;/td&gt;
&lt;td&gt;Only one method may be used to authenticate at a time (Auth header, GET or POST)&lt;/td&gt;
&lt;td&gt;La requ&#234;te est mal form&#233;e&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_request&lt;/td&gt;
&lt;td&gt;Missing parameters : &#034;token&#034; is required&lt;/td&gt;
&lt;td&gt;La requ&#234;te Introspection requiert le param&#232;tre 'token'.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_request&lt;/td&gt;
&lt;td&gt;When putting the token in the body, the method must be POST or PUT&lt;/td&gt;
&lt;td&gt;Si on place le token dans le corps de la requ&#234;te, la m&#233;thode ne peut &#234;tre que POST ou PUT&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_request&lt;/td&gt;
&lt;td&gt;The content type for POST requests must be &#034;application/x-www-form-urlencoded&lt;/td&gt;
&lt;td&gt;l'IETF sp&#233;cifie ce type de contenu. NB : tous les serveurs Web ne remplissent pas cette variable _SERVER voir &lt;a href=&#034;http://tools.ietf.org/html/rfc6750#section-2.2&#034; class='spip_url spip_out auto' rel='nofollow external'&gt;http://tools.ietf.org/html/rfc6750#section-2.2&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;invalid_token&lt;/td&gt;
&lt;td&gt;JWT is malformed&lt;/td&gt;
&lt;td&gt;le jeton JWT ne peut &#234;tre d&#233;cod&#233;.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;h3 class=&#034;spip&#034;&gt;Exemples&lt;/h3&gt;
&lt;p&gt;Demande de validation d'un jeton d'identit&#233;, m&#233;thode Auth Header (ou &#034;JWT Bearer&#034; ) :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;/*&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;Autorisation avec OAuth Server by DnC&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;OpenID Connect : Introspection, m&#233;thode Auth Header &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;*/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000000; font-weight: bold;&#034;&gt;function&lt;/span&gt; oauth_authorize&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$Ok&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;false&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;!&lt;/span&gt;&lt;a href=&#034;http://www.php.net/empty&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;AUTHENTICATION_SERVER_URL &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'introspect'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Authorization: Bearer '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$response&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;int&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;a href=&#034;http://www.php.net/curl_getinfo&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_getinfo&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'http_code'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;===&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;200&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$jwt&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/json_decode&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;json_decode&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$response&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$Ok&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$jwt&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'active'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$Ok&lt;/span&gt; AND &lt;a href=&#034;http://www.php.net/isset&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;HTTP_REFERER&#034;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$urlParts&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/parse_url&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;parse_url&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;HTTP_REFERER&#034;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$urlParts&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'host'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;!==&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;HTTP_HOST&#034;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// CORS : autoriser l'origine&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$issuer&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$urlParts&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'scheme'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;://&#034;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$urlParts&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'host'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; include_spip&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'inc/headers'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/header&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Access-Control-Allow-Origin'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$issuer&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$Ok&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/f546d8239657ccedea95364e8ab2cb92.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;Variante avec m&#233;thode GET pour SPIP :&lt;br class='autobr' /&gt;
&lt;strong&gt;SPIP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;/*&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;Autorisation avec OAuth Server by DnC&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;OpenID Connect : Introspection, m&#233;thode GET &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;*/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000000; font-weight: bold;&#034;&gt;function&lt;/span&gt; oauth_authorize&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$Ok&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;false&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;!&lt;/span&gt;&lt;a href=&#034;http://www.php.net/empty&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Interroger l'introspection de OAuth Server by DnC&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; include_spip&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'inc/distant'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$url&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;http://oa.dnc.global/introspect?token=&#034;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$response&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; recuperer_url&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$url&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;int&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$response&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'status'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;===&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;200&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$jwt&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/json_decode&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;json_decode&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$response&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'page'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$jwt&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'active'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;a href=&#034;http://www.php.net/isset&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;HTTP_ORIGIN&#034;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Acc&#232;s HTTP (CORS) : autoriser l'origine&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; include_spip&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'inc/headers'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$issuer&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/trim&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;trim&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&#034;http://www.php.net/strtr&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strtr&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;HTTP_ORIGIN&#034;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'&lt;&gt;&#034;\''&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'[]##'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/header&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Access-Control-Allow-Origin'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$issuer&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$Ok&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$Ok&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/f9ed3e05ef32d40e5354ea7f9e794a98.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Un exemple plus complet, faisant appara&#238;tre la totalit&#233; des erreurs possibles, figure ici : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#openidconnectexemplescompletsdufluxdautorisationviauncodepuisrequeteuserinfo' class='spip_in'&gt;OpenID Connect : Exemples complets du flux d'Autorisation via un code puis requ&#234;te UserInfo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes :&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Dans le cas o&#249; l'application cliente et le serveur de donn&#233;es prot&#233;g&#233;es se trouvent dans des domaines diff&#233;rents, il faut g&#233;rer l'autorisation HTTP, comme cela est fait dans l'exemple ci-dessus. Voyez &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#controledacceshttpcors' class='spip_in'&gt;Contr&#244;le d'acc&#232;s HTTP (CORS)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; L'interrogation du serveur d'autorisation &#224; chaque acc&#232;s d'une ressource prot&#233;g&#233;e peut le surcharger. Pour &#233;viter cela, on peut mettre en cache la r&#233;ponse du serveur du c&#244;t&#233; du serveur de ressource. Avec SPIP, c'est le r&#244;le de la fonction &lt;a href=&#034;http://code.spip.net/autodoc/tree/ecrire/inc/distant.php.html#function_recuperer_url_cache&#034; class='spip_out' rel='external'&gt;recuperer_url_cache()&lt;/a&gt; qui pourra remplacer &lt;a href=&#034;http://code.spip.net/autodoc/tree/ecrire/inc/distant.php.html#function_recuperer_url&#034; class='spip_out' rel='external'&gt;recuperer_url()&lt;/a&gt; dans l'exemple pr&#233;c&#233;dent. La fonction permet de r&#233;gler le d&#233;lai de garde en cache, qu'il convient de fixer &#224; une dur&#233;e assez courte (10 secondes par exemple), l'essentiel &#233;tant de ne pas bombarder le serveur. Voici un exemple :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SPIP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034; data-clipboard-text=&#034;$res = recuperer_url_cache( $url, array('delai_cache' =&gt; 10) ); // D&#233;lai de 10s&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; recuperer_url_cache&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$url&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'delai_cache'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// D&#233;lai de 10s&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;La fonction d&#233;crite pr&#233;c&#233;demment peut &#234;tre utilis&#233;e dans une fonction d'autorisation d'acc&#232;s &#224; un objet SPIP ( ici l'objet gis de radar ) :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SPIP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000000; font-weight: bold;&#034;&gt;function&lt;/span&gt; _autoriser_gis&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$faire&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$quoi&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$id&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$qui&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$options&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$qui&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'statut'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'0minirezo'&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Toujours autoriser un administrateur&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;else&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$_GET&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'token'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// V&#233;rifier le jeton d'acc&#232;s&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;return&lt;/span&gt; oauth_authorize&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$idtoken&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;else&lt;/span&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;false&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/537cdc13218065f5ea90df5df93ef8ca.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Il faut cependant noter que la mise en cache expose &#224; la r&#233;utilisation du jeton par un malware.&lt;/p&gt;
&lt;p&gt;Exemple d'appel, avec le jeton pass&#233; par la m&#233;thode Auth Header et le param&#232;tre '&lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#verificationdeloriginedelarequeterecueparunserveurderessource' class='spip_in'&gt;requester_ip&lt;/a&gt;' par Post :&lt;br class='autobr' /&gt;
&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Method Bearer + parameters by Post&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'requester_ip'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$_SERVER&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'SERVER_ADDR'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$authorization&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;Authorization: Bearer &#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'id_token'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$introspection_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Authorization: Bearer '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$id_token&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #339933;&#034;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/e13c64904e5aa04d40a6454be3c83ff8.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;a id=&#034;avantages&#034;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Avantages et inconv&#233;nients de l'Introspection&lt;/h3&gt;
&lt;p&gt;La validation du jeton d'identit&#233; (ID Token) aupr&#232;s du serveur d'authentification (introspection) pr&#233;sente quatre avantages importants : &lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; elle permet de &lt;strong&gt;savoir si le jeton a &#233;t&#233; r&#233;voqu&#233;&lt;/strong&gt;, contrairement &#224; la validation locale ; c'est l&#224; un avantage fondamental pour la s&#233;curit&#233; : si vous d&#233;cidez de r&#233;voquer un jeton d'acc&#232;s, alors il faut bien que les applications r&#233;agissent, le seul moyen est l'introspection.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; cette m&#233;thode ne n&#233;cessite pas de conna&#238;tre la cl&#233; publique de l'application cliente pour valider la signature du jeton, ce qui permet &#224; des serveurs de ressource &#233;trangers &#224; l'organisation de valider les jetons re&#231;us ;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; on peut obtenir des informations sur l'utilisateur final (qui est &#224; l'origine de l'autorisation) qui permettent d'identifier cet utilisateur et, donc, d'agir en fonction de la confiance &#224; accorder d'apr&#232;s son profil ;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; il est possible de mettre en &#339;uvre la d&#233;claration &#034;jti&#034; (JWT ID) qui permet au serveur d'autorisation de v&#233;rifier que le jeton n'a pas d&#233;j&#224; &#233;t&#233; utilis&#233; ;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; OAuthSD propose &#233;galement la v&#233;rification de l'IP du demandeur : si une ressource prot&#233;g&#233;e a transmis l'adresse IP de son propre demandeur avec le param&#232;tre 'requester_ip', on v&#233;rifie que cette adresse IP se trouve dans le sous-r&#233;seau de l'application cliente identifi&#233;e par la d&#233;claration 'aud'. Cela est essentiel pour ne pas r&#233;pondre &#224; un malware ayant intercept&#233; le jeton.&lt;/p&gt;
&lt;p&gt;Elle a pour seul inconv&#233;nient d'augmenter le trafic avec le serveur d'autorisation.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Remarque quant au lien entre jeton d'identit&#233; et jeton d'acc&#232;s et l'int&#233;r&#234;t r&#233;el de ce dernier&lt;/h3&gt;
&lt;p&gt;Justin Richer : (&lt;a href=&#034;http://lists.openid.net/pipermail/openid-specs-ab/Week-of-Mon-20130909/003951.html&#034; class='spip_out' rel='external'&gt;openid-specs-ab&lt;/a&gt;)&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;&lt;i&gt;&#034;Il n'y a pas de relation 1:1 entre le jeton d'acc&#232;s et jeton d'identit&#233; (ID Token), surtout si vous consid&#233;rez que le jeton d'acc&#232;s peut &#234;tre actualis&#233; ou ne pas expirer, alors que le jeton d'identit&#233; doit expirer. Le ID Token repr&#233;sente l'&#233;v&#233;nement authn (et la session, dans une certaine mesure), alors que le jeton d'acc&#232;s repr&#233;sente une autorisation d&#233;l&#233;gu&#233;e d'acc&#232;s aux informations de profil de l'utilisateur. Vous pouvez obtenir des informations sur l'&#233;v&#233;nement d'authentification qui a g&#233;n&#233;r&#233; le jeton d'acc&#232;s &#224; partir de l'introspection, mais il est important de se rappeler que le jeton d'acc&#232;s n'est pas destin&#233; &#224; &#234;tre &#233;troitement li&#233; &#224; cet &#233;v&#233;nement d'authentification. En fait, c'est toute la question d'OAuth qui lie de fa&#231;on l&#226;che l'authentification au jeton d'acc&#232;s et maintient le jeton d'acc&#232;s valide alors que l'utilisateur n'est plus l&#224;.&lt;/i&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Cette remarque &#224; propos de la faiblesse du lien entre jeton d'acc&#232;s et jeton d'identit&#233; rejoint la conclusion &#233;mise &#224; propos de la &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#demandedinformationssurlutilisateuruserinfoendpoint' class='spip_in'&gt;requ&#234;te Userinfo&lt;/a&gt; : toute requ&#234;te Userinfo devrait suivre le cycle : demande d'autorisation, validation du ID Token, demande Userinfo, v&#233;rification de la concordance des user_id. C'est ce qui est d&#233;crit dans les &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#openidconnectexemplescompletsdufluxdautorisationviauncodepuisrequeteuserinfo' class='spip_in'&gt;exemples&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Que vaut r&#233;ellement un jeton d'acc&#232;s si :
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; on ne peut v&#233;rifier sa validit&#233; sans introspection&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-2' class='spip_note' rel='appendix' title='Une piste consiste &#224; Emettre un jeton d'acc&#232;s en tant que JWT.' id='nh2-2'&gt;2&lt;/a&gt;]&lt;/span&gt; (autant alors faire l'introspection pour le jeton d'identit&#233;),
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; on n'est pas certain du lien avec le jeton d'identit&#233; ?&lt;/p&gt;
&lt;p&gt;Plus g&#233;n&#233;ralement, ne devrait-on pas conclure ainsi : &lt;strong&gt;plut&#244;t que d'utiliser le jeton d'acc&#232;s ne vaudrait-il pas mieux utiliser exclusivement le jeton d'identit&#233; ?&lt;/strong&gt; C'est pour cela qu'il existe un flux OpenID Connect ne retournant que l'ID Token.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb2-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-1' class='spip_note' title='Notes 2-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;OAuthSD autorise tous les clients enregistr&#233;s &#224; acc&#233;der au point de terminaison d'introspection. Il est donc inutile de sp&#233;cifier un scope ou une m&#233;tadonn&#233;e particuliers.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-2' class='spip_note' title='Notes 2-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;Une piste consiste &#224; &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#emettreunjetondaccesentantquejwt' class='spip_in'&gt;Emettre un jeton d'acc&#232;s en tant que JWT&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>API OpenId Connect : Point d'extr&#233;mit&#233; d'informations sur les clefs (Keys Endpoint)</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedinformationssurlesclefskeysendpoint</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedinformationssurlesclefskeysendpoint</guid>
		<dc:date>2021-04-14T10:15:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Le protocole OpenID Connect utilise un jeton d'identit&#233; (ID Token) fond&#233; sur JWT. La norme d&#233;crit comment une application cliente doit valider un ID Token re&#231;u en r&#233;ponse &#224; une demande d'authentification. Cette v&#233;rification peut se faire localement (ou sinon par introspection), ce qui n&#233;cessite d'acc&#233;der aux informations sur les cl&#233;s publiques. &lt;br class='autobr' /&gt;
C'est ce que permet le &lt;br class='autobr' /&gt;
Point d'extr&#233;mit&#233; d'informations sur les clefs (Keys Endpoint) &lt;br class='autobr' /&gt;
https://oa.dnc.global/keys &lt;br class='autobr' /&gt;
Forme de la demande d'informations sur les cl&#233;s (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L128xH128/arton57-692a7.png?1733821221' width='128' height='128' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;Le protocole OpenID Connect utilise un &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jsonwebtokenjwt' class='spip_in'&gt;jeton d'identit&#233; (ID Token) fond&#233; sur JWT&lt;/a&gt;. La norme d&#233;crit comment une application cliente doit &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-6-.html#validationdujetondidentiteidtokenjwtsigneoujws' class='spip_in'&gt;valider un ID Token&lt;/a&gt; re&#231;u en r&#233;ponse &#224; une demande d'authentification. Cette v&#233;rification peut se faire localement (ou sinon par introspection), ce qui n&#233;cessite d'acc&#233;der aux informations sur les cl&#233;s publiques.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;C'est ce que permet le&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Point d'extr&#233;mit&#233; d'informations sur les clefs (Keys Endpoint)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/keys&lt;/code&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Forme de la demande d'informations sur les cl&#233;s&lt;/h3&gt;
&lt;p&gt;La demande ne doit &#234;tre effectu&#233;e que par la m&#233;thode POST.&lt;/p&gt;
&lt;p&gt;Le client doit inclure ses informations d'authentification telles que d&#233;crites &#224; la section 2.3. du document [RFC6749].&lt;/p&gt;
&lt;p&gt;Exemple de requ&#234;te :&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;POST /keys HTTP/1.1&lt;br /&gt; Host: oa.dnc.global&lt;br /&gt; Content-Type: application/x-www-form-urlencoded&lt;br /&gt; Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW&lt;/code&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;R&#233;ponse&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;En cas de succ&#232;s&lt;/strong&gt; le serveur retourne une r&#233;ponse HTTP 200.&lt;br class='autobr' /&gt;
Le corps de la r&#233;ponse contient une liste de d&#233;finitions des cl&#233;s publiques.&lt;/p&gt;
&lt;p&gt;Chaque d&#233;finition de cl&#233; est repr&#233;sent&#233;e sous un format JSON telle que d&#233;fini dans le document &lt;a href=&#034;https://tools.ietf.org/html/rfc7517&#034; class='spip_out' rel='external'&gt;JSON Web Key (JWK)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exemple&lt;/strong&gt;&lt;br class='autobr' /&gt;
Voici un exemple de r&#233;ponse au format JSON :&lt;br class='autobr' /&gt;
&lt;strong&gt;[JSON]&lt;/strong&gt;&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;{&#034;keys&#034;:[{&lt;br /&gt; &#034;kid&#034;:&#034;618584200ef916a154008d898a1e7edc&#034;,&lt;br /&gt; &#034;kty&#034;:&#034;RSA&#034;,&lt;br /&gt; &#034;alg&#034;:&#034;RS256&#034;,&lt;br /&gt; &#034;use&#034;:&#034;sig&#034;,&lt;br /&gt; &#034;e&#034;:&#034;AQAB&#034;,&lt;br /&gt; &#034;n&#034;:&#034;ykcWIXjQ-f61XCJutT4JcgpmmobtB0U7ZcejT8tBD8rOZPkQDYf0Q3pMjCkNT8RRKzMYtkelY2CNn3U7kVJMgbJAtvZsCdlChVHAKvRnjwh1GR_6Zpmajm5cuz4bjQWWUIPIoXe_4JbC8nCrHdaagzB_6PrV_NILyn5unG1RLOrWx7_yzLaterDKxHTCBeOlqv_5VGFey0Ecf-X7Bj8YRx6fpamK4BcEAZSAbZMtAnTckp3hOYJgZo3MOXDxSQw1YR83i5Udcoaf7sxfhEA_b7r9CeNfgj76MKM7sdCfBMI7_JSz-YU_pJKCuT9Ny3IJQ0fQHpDzSq2oD_3cDcLjfXTGM67rXElwr9l8yrSNa29UGK4q2u9cFCQmJGlxVhZU6bzs7l4202LTJdPlzm_29jwLVvtqnVJSovMLHx84ReFtus1RdKRGB2plDQccvBNvp92D9lOnM3bAu1fKRAJwNh3hg1d6k7MVCHxoo9HVnkxzW48rAAJE2nk44a2Y0cclufBhvKRdNavldS1XOyZ_qf3qCAzsuYF1VAga8I-QOb6OyXp0KGLptbyYD-ZXISGPw3pDD3aAof_PMfFhSB96GHDnm-UCRpFHndQ_fZgtZhWugU8z22rV-irYCySqVkpE0ToWbNXNFZ9Jo1GXdwkpi1WjB7S-ipjzRFOlxhwbvZ0&#034;},&lt;br /&gt; ...&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;kid&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Comme diff&#233;rentes applications clientes peuvent utiliser la m&#234;me paire de cl&#233; publique/priv&#233;e, les cl&#233;s sont index&#233;es par un identifiant &#034;kid&#034; plut&#244;t que par un client_id.&lt;/p&gt;
&lt;p&gt;Cet identifiant est notamment pr&#233;sent dans la charge utile du &lt;a href='https://static.oa.dnc.global/-JSON-Web-Token-JWT-JWS-.html#jsonwebtokenjwt' class='spip_in'&gt;jeton JWT&lt;/a&gt;, ce qui permettra de s&#233;lectionner la cl&#233; publique n&#233;cessaire pour &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-6-.html#validationdujetondidentiteidtokenjwtsigneoujws' class='spip_in'&gt;valider la signature du jeton JWT&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt; jwks_uri, fichier jwks.json&lt;/h3&gt;
&lt;p&gt;La norme pr&#233;voit que le document de d&#233;couverte .well-known/openid_configuration d&#233;finisse une constante jwks_uri donnant l'URL du fichier jwks.json, sous la forme :&lt;br class='autobr' /&gt;
&lt;code class='spip_code' dir='ltr'&gt;&#034;jwks_uri&#034; : &#034;https://oa.dnc.global/jwks/jwks.json&#034;,&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Cette URL permet d'obtenir la m&#234;me information que par le Point d'extr&#233;mit&#233; d'informations sur les clefs. Cependant, ces donn&#233;es sont statiques, alors que l'appel au contr&#244;leur Keys recalcule le fichier jwks.json &#224; chaque fois afin de prendre en compte un &#233;ventuel changement.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;UpdatekeysController&lt;/h3&gt;
&lt;p&gt;OAuthSD propose un point d'entr&#233;e &#034;updatekeys&#034; qui provoque le re-calcul des paires de cl&#233;s publiques-priv&#233;es de tous les clients ainsi que la mise &#224; jour des informations sur les cl&#233;s.&lt;br class='autobr' /&gt;
Ce contr&#244;leur n'est accessible qu'&#224; partir de la m&#234;me adresse que le serveur et sera donc soit lanc&#233; localement par le Superviseur soit par une t&#226;che CRON &#224; l'aide de wget.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Outre le fichier jwks.json, le dossier /jwks contient un fichier au format JSON pour chaque cl&#233; publique, sous le nom &lt;code class='spip_code' dir='ltr'&gt;&lt;kid&gt;.json&lt;/code&gt;.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Compte-tenu de la charge de calcul n&#233;cessaire &#224; l'&#233;tablissement du fichier, l'appel au point d'extr&#233;mit&#233; Keys doit &#234;tre r&#233;serv&#233; &#224; des applications de confiance ou &#234;tre prot&#233;g&#233; contre les attaques de type d&#233;ni de service.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Pour &#233;viter le recalcul du fichier jwks.json &#224; chaque appel de Keys, il est possible de modifier la r&#232;gle de r&#233;&#233;criture dans le fichier .htaccess pour :&lt;br class='autobr' /&gt;
&lt;code class='spip_code' dir='ltr'&gt;RewriteRule ^keys /jwks/jwks.json [QSA,L]&lt;/code&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Une cl&#233; publique peut &#233;galement &#234;tre lue au moyen de l'&lt;a href='https://static.oa.dnc.global/-Techniques-et-code-du-serveur-OAuthSD-.html#apihttpresttreeql' class='spip_in'&gt;API HTTP REST + TreeQL&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>API OpenID Connect : Logout (Logout Endpoint)</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectlogoutlogoutendpoint</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectlogoutlogoutendpoint</guid>
		<dc:date>2019-03-08T11:23:32Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Le point d'extr&#233;mit&#233; logout permet la &#034;d&#233;connexion unique&#034; (Single Logout, SLO) &#224; partir d'une application (front channel single logout, RP generated logout etc.) : toutes les connexions d'un utilisateur sur les diff&#233;rentes applications sont invalid&#233;es. &lt;br class='autobr' /&gt;
Importance de la d&#233;connexion unique pour la s&#233;curit&#233; &lt;br class='autobr' /&gt;
La d&#233;connexion unique (SLO) est la contrepartie de la connexion unique (SSO). L'authentification unique am&#233;liore l'exp&#233;rience de l'utilisateur en minimisant le nombre de proc&#233;dures de connexion et en (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L150xH150/arton89-620e0.png?1734010482' width='150' height='150' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;Le point d'extr&#233;mit&#233; logout permet la &#034;d&#233;connexion unique&#034; (Single Logout, SLO) &#224; partir d'une application (front channel single logout, RP generated logout etc.) : toutes les connexions d'un utilisateur sur les diff&#233;rentes applications sont invalid&#233;es.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Importance de la d&#233;connexion unique pour la s&#233;curit&#233;&lt;/h3&gt;
&lt;p&gt;La d&#233;connexion unique (SLO) est la contrepartie de la connexion unique (SSO). L'authentification unique am&#233;liore l'exp&#233;rience de l'utilisateur en minimisant le nombre de proc&#233;dures de connexion et en lui permettant d'avoir des connexions ouvertes sur diff&#233;rentes applications sans avoir &#224; fournir les informations d'identification &#224; chaque fois.&lt;/p&gt;
&lt;p&gt;Ce faisant, il existe un risque que l'utilisateur omette de se d&#233;connecter d'une ou plusieurs applications, ce qui pourrait &#234;tre exploit&#233; par un utilisateur malveillant. Avec la d&#233;connexion unique, l'utilisateur peut mettre fin &#224; toutes les sessions sans avoir &#224; se d&#233;connecter activement de chaque application, m&#234;me si elles ont &#233;t&#233; ouvertes sur diff&#233;rents postes de travail ou mobiles. En cons&#233;quence, une application impl&#233;mentant la d&#233;connexion unique prot&#232;ge les utilisateurs et leurs donn&#233;es car il garantit qu'il ne reste aucune connexion active.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Impl&#233;mentation de la d&#233;connexion unique&lt;/h3&gt;
&lt;p&gt;ll n'y a pas &#224; ce jour (fin 2018) de &#034;norme&#034; d&#233;finissant la d&#233;connexion pour OpenID Connect. Pour s'en convaincre, il suffit de voir cet article tr&#232;s complet : &lt;a href=&#034;https://medium.com/@robert.broeckelmann/openid-connect-logout-eccc73df758f&#034; class='spip_out' rel='external'&gt;OpenID Connect Logout&lt;/a&gt; et de consid&#233;rer l'&#233;tat d'avancement de la proposition de norme : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement' class='spip_in'&gt;OpenID Connect Session Management&lt;/a&gt;. Les nombreuses r&#233;f&#233;rences &#224; des propositions de standard (drafts) et la complexit&#233; des solutions propos&#233;es montrent la difficult&#233; dans laquelle se trouve la communaut&#233; Openid pour adopter une solution. DnC propose pour OAuthSD une solution de d&#233;connexion centralis&#233;e particuli&#232;rement simple s'appuyant sur le cookie SLI.&lt;/p&gt;
&lt;p&gt;La d&#233;connexion est g&#233;n&#233;rale (Single Logout, SLO) : toutes les connexions d'un utilisateur sur diff&#233;rentes applications, diff&#233;rentes machines et quelque soit le lieu, sont invalid&#233;es.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Point d'extr&#233;mit&#233; de d&#233;connexion unique (Single Logout Endpoint)&lt;/strong&gt;&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;https://oa.dnc.global/logout&lt;/code&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;Forme de la demande de d&#233;connexion unique&lt;/h3&gt;
&lt;p&gt;Une application effectue une demande de d&#233;connexion en passant le jeton d'identit&#233;.&lt;/p&gt;
&lt;p&gt;Le jeton est pass&#233; avec le param&#232;tre &#034;token&#034; par l'une des m&#233;thodes suivantes : Auth Header, GET ou POST. Se reporter &#224; &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectintrospectionintrospectionendpoint' class='spip_in'&gt;API Open ID Connect : Introspection (Introspection Endpoint)&lt;/a&gt; pour la description de l'appel.&lt;/p&gt;
&lt;p&gt;Exemple d'appel :&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$jwt&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'active'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'true'&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Post Methode &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$data1&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'token'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$id_token&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Effectuer un logout&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$logout_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data1&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_close&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_close&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;a href=&#034;http://www.php.net/empty&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'error'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Continuer avec la d&#233;connexion locale&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #339933;&#034;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;else&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// ne pas d&#233;connecter localement, signaler l'erreur.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #339933;&#034;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// JWT is inactive&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/exit&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Error : Invactive ID Token'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/21d8b5701a55f61f1f6753b95ad8e268.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;R&#233;ponse du serveur&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;En cas de succ&#232;s&lt;/strong&gt;, le serveur retourne une r&#233;ponse HTTP 200. Tous les jetons d'acc&#232;s enregistr&#233;s sur le serveur pour l'utilisateur final connect&#233; &#224; l'application sont effac&#233;s. De ce fait, les cookies SLI &#233;ventuellement pr&#233;sents sur les agents de l'utilisateur seront d&#233;truits si une tentative de connexion est effectu&#233;e.&lt;/p&gt;
&lt;p&gt;Notons que, contrairement au m&#233;canisme de SLI qui est attach&#233; &#224; un agent utilisateur (un navigateur sur un poste de travail), la d&#233;connexion unique s'applique &#224; tous les agents que l'utilisateur aurait utilis&#233;s pour se connecter &#224; des applications puisque tous les jetons d'acc&#232;s enregistr&#233;s pour cet utilisateur seront effac&#233;s.&lt;/p&gt;
&lt;p&gt;&lt;a href='https://static.oa.dnc.global/-Identifier-l-utilisateur-final-.html#lafindesmotsdepassenopassconnect' class='spip_in'&gt;NoPassConnect&lt;/a&gt; tire parti de cette fonctionnalit&#233; en permettant la d&#233;connexion &#224; distance &#224; l'aide d'un mobile.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;En cas d'&#233;chec de la requ&#234;te&lt;/strong&gt;, le serveur n'effectue pas la d&#233;connexion et retourne une r&#233;ponse HTTP 403.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Conna&#238;tre l'&#233;tat de connexion d'une application&lt;/h3&gt;
&lt;p&gt;Si on souhaite conna&#238;tre l'&#233;tat actuel de connexion d'une application, il suffit de r&#233;p&#233;ter la demande d'authentification avec prompt = 'none'. Si la d&#233;connexion a eu lieu, le serveur r&#233;pondra avec l'erreur 'login_required' et un code HTTP 403. Cette solution a l'avantage de r&#233;pondre totalement &#224; la norme OpenID Connect dans son &#233;tat d&#233;finitif.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Discussion, alternative&lt;/h3&gt;
&lt;p&gt;Au re&#231;u du code HTTP 200, l'application cliente &#224; partir de laquelle a &#233;t&#233; &#233;mis la d&#233;connexion pourra proc&#233;der &#224; la d&#233;connexion locale (probablement effacer des donn&#233;es de session et d&#233;truire un cookie de connexion etc.).&lt;/p&gt;
&lt;p&gt;La question se pose pour les autres applications clientes que l'utilisateur aurait connect&#233;es pr&#233;c&#233;demment.&lt;/p&gt;
&lt;p&gt;Ces applications seront d&#233;connect&#233;es (ne pourront se reconnecter automatiquement par &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#slissosloetsrasontdansunbateauoauthsd' class='spip_in'&gt;Silent Re-Authentication (SRA)&lt;/a&gt;) &#224; la fin de la validit&#233; de leur session locale. M&#234;me si elles apparaissent connect&#233;es, les requ&#234;tes qu'elles tenteront d'effectuer en direction des ressources prot&#233;g&#233;es par le serveur OIDC n'aboutiront pas. Le retour d'erreur en r&#233;sultant permettra au concepteur de l'application de pr&#233;voir une d&#233;connexion locale.&lt;/p&gt;
&lt;p&gt;Si la dur&#233;e de la session locale de l'application cliente est courte, on aboutira &#224; une d&#233;connexion dans un d&#233;lai court. A la limite, il existe des application sans session qui interrogent le serveur OIDC &#224; chaque sollicitation pour authentifier la requ&#234;te qui leur est faite. Les applications mono page et les services HTTP REST (sant &#233;tat) appartiennent &#224; cette cat&#233;gorie.&lt;/p&gt;
&lt;p&gt;Quoiqu'il en soit, le concepteur d'une application devrait int&#233;grer un m&#233;canisme de suivi de la validit&#233; du jeton d'acc&#232;s pour informer l'utilisateur local et d&#233;connecter localement l'application si le jeton est p&#233;rim&#233;. C'est l'objet de notre &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo' class='spip_in'&gt;Monitoring de l'&#233;tat de l'authentification et SLO&lt;/a&gt;. Le dispositif de Logout rentre ainsi dans le cadre du &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html' class='spip_in'&gt;management de session&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Une alternative &#224; notre m&#233;thode de d&#233;connexion est d&#233;crite ici : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement' class='spip_in'&gt;OpenID Connect Session Management&lt;/a&gt;. Bien qu'il soit inscrit dans ce projet de sp&#233;cification que la connaissance de l'&#233;tat de connexion actuel d'une application (pour faire appara&#238;tre la d&#233;connexion) peut &#234;tre fait &#034;sans g&#233;n&#233;rer de trafic sur le r&#233;seau&#034;, il n'en est rien car on &#034;interroge l'OP ... &#224; un intervalle appropri&#233;&#034;. La technique introduit donc un d&#233;lai d'apparition de la d&#233;connexion.&lt;/p&gt;
&lt;p&gt;Notre m&#233;thode de d&#233;connexion appara&#238;t donc tr&#232;s int&#233;ressante, notamment si on consid&#232;re sa simplicit&#233; de mise en oeuvre au regard des importantes modifications &#224; apporter aux applications requises par le management de session OpenID Connect dont l'avenir, de plus, nous parait mal assur&#233;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>API OpenID Connect : Point d'extr&#233;mit&#233; d'autorisation (Authorization Endpoint)</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedautorisationauthorizationendpoint</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedautorisationauthorizationendpoint</guid>
		<dc:date>2018-04-19T10:27:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;C'est le point d'extr&#233;mit&#233; sur le serveur d'autorisation auquel l'user-agent (en g&#233;n&#233;ral un navigateur Web) de l'utilisateur final est redirig&#233;, pour lui permettre de s'identifier et d'accorder des autorisations &#224; l'application cliente.
&lt;br class='autobr' /&gt;
Dans le cas du flux d'autorisation avec code (Authorization code flow), le contr&#244;leur Authorize redirige l'user-agent sur le point d'extr&#233;mit&#233; Token avec un code d'autorisation.
&lt;br class='autobr' /&gt;
Le flux implicite permet d'obtenir directement les jetons. Point d'extr&#233;mit&#233; d'autorisation (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;C'est le point d'extr&#233;mit&#233; sur le serveur d'autorisation auquel l'user-agent (en g&#233;n&#233;ral un navigateur Web) de l'utilisateur final est redirig&#233;, pour lui permettre de s'identifier et d'accorder des autorisations &#224; l'application cliente.&lt;br class='autobr' /&gt;
Dans le cas du &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html' class='spip_in'&gt;flux d'autorisation avec code (Authorization code flow)&lt;/a&gt;, le contr&#244;leur Authorize redirige l'user-agent sur le point d'extr&#233;mit&#233; Token avec un code d'autorisation.&lt;br class='autobr' /&gt;
Le flux implicite permet d'obtenir directement les jetons.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Point d'extr&#233;mit&#233; d'autorisation (Authorization Endpoint)&lt;/h3&gt;
&lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/authorize&lt;/code&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Forme de la demande d'autorisation&lt;/h3&gt;
&lt;p&gt;Exemples d'appel Authorize :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'response_type'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'code'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'client_id'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'chemin_openid'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'state'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$oauth_state&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'scope'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'openid profile'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$authorization_endpoint&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'https://oa.dnc.global/authorization'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$authorization_endpoint&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'?'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/header&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Location: '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$authorization_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/exit&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/95a1ebf72ea191028f80aea0344cef27.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;SPIP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; include_spip&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'inc/headers'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$oauth_state&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; session_get&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'oauth_state'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$url&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;http://oa.dnc.global/authorize?response_type=code&amp;client_id=chemin_openid&amp;scope=openid profile&amp;redirect_uri=http://chemindeleau.com/callback_openid.php&amp;state=&lt;span style=&#034;color: #006699; font-weight: bold;&#034;&gt;$oauth_state&lt;/span&gt;&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;redirige_par_entete&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$url&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/b9e3d4dc274213bd18dad6eff53c9495.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Notes :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Pour obtenir un jeton d'identit&#233;, le scope doit comporter &#034;openid&#034;. Dans le cas contraire, la r&#233;ponse sera identique &#224; celle du protocole OAuth 2.0, et ne comprendra donc que le jeton d'acc&#232;s.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Pour obtenir un jeton de rafra&#238;chissement (Refresh Token), le scope doit comporter &#034;offline_access&#034;.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Bien que la &#034;norme&#034; indique que le param&#232;tre redirect_uri est obligatoire, il peut &#234;tre omis si l'application cliente a &#233;t&#233; inscrite avec une seule adresse de retour.&lt;br class='autobr' /&gt;
Bien que la norme indique que le param&#232;tre state est facultatif, il est essentiel pour la s&#233;curit&#233; de le pr&#233;senter dans la demande.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; si l'application cliente a &#233;t&#233; inscrite avec plusieurs adresses de retour, le param&#232;tre redirect_uri est obligatoire, et doit repr&#233;senter l'une d'elles.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Il est possible de rajouter &#224; l'URL tout param&#232;tre utile. Ceux-ci seront retransmis dans le corps de la r&#233;ponse, de fa&#231;on quasi int&#233;grale.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Avant qu'elle puisse interagir dans un flux OpenID Connect, l'auteur doit &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-6-.html#openidconnectlieruneapplicationclienteauserveuroauthsd' class='spip_in'&gt;inscrire l'application cliente sur le serveur OAuthSD&lt;/a&gt; avec les param&#232;tres attendus par OpenID Connect.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Il est de la responsabilit&#233; de l'application cliente d'assurer la bonne forme et la s&#233;curit&#233; des valeurs transmises par les param&#232;tres d'URL.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Authentification de l'utilisateur final&lt;/h3&gt;
&lt;p&gt;A l'appel du Point d'extr&#233;mit&#233; d'autorisation :
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; le serveur OAuthSD redirige l'user-agent vers la page d'authentification (on reste dans le domaine du serveur d'autorisation).
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; l'utilisateur final s'authentifie dans cette page (les identifiants sont donc confin&#233;s au niveau du serveur).
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; le serveur poste le code d'autorisation au Point d'extr&#233;mit&#233; de redirection.&lt;/p&gt;
&lt;p&gt;Voici un exemple de page d'authentification :&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;http://oa.dnc.global/authorize?response_type=code&amp;client_id=chemin_openid&amp;redirect_uri=http://chemindeleau.com/callback_openid.php&amp;state=4f67ae45bd188aa3&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;span class='spip_document_15 spip_documents spip_documents_center'&gt;
&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L470xH728/login_2-c5934.png?1733821221' width='470' height='728' alt=&#034;&#034; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Notes : &lt;/strong&gt; &lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; si l'on souhaite afficher la page d'authentification dans le contexte visuel de l'application cliente, il faut le faire dans un iFrame, plut&#244;t que par une insertion en script c&#244;t&#233; client (Popup Javascript), afin de ne pas compromettre les identifiants de l'utilisateur. Cependant, il convient d'appliquer les bonnes pratiques de s&#233;curit&#233; relatives &#224; la mise en oeuvre des iFrame.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Retour &#224; l'application cliente&lt;/h3&gt;
&lt;p&gt;En cas de succ&#232;s, le serveur redirige le navigateur sur le point d'extr&#233;mit&#233; de redirection dans l'application cliente ( par ent&#234;te HTTP code 302 ). Cet URI est d&#233;fini par l'auteur d'une application cliente quand il l'inscrit sur ce serveur. Voir : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-6-.html#openidconnectlieruneapplicationclienteauserveuroauthsd' class='spip_in'&gt;OpenID Connect : Lier une application cliente au serveur OAuthSD&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Les param&#232;tres code et state sont pass&#233;s dans l'URL. Exemple :&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;http://chemindeleau.com/callback_openid.php?code=3159339c2f1326f9fa128e161b8387feca690b65&amp;state=98b3027139f7cb3be4a885d7c81b41bb&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Il est de la responsabilit&#233; de l'application cliente d'assurer sa s&#233;curit&#233; vis-&#224;-vis des valeurs transmises par les param&#232;tres d'URL.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Situations d'erreur&lt;/h3&gt;
&lt;p&gt;En cas d'&#233;chec le corps de la r&#233;ponse contient :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='id0886_c0'&gt; index &lt;/th&gt;&lt;th id='id0886_c1'&gt; type &lt;/th&gt;&lt;th id='id0886_c2'&gt; valeur &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='id0886_c0'&gt;page&lt;/td&gt;
&lt;td headers='id0886_c1'&gt;JSON Array&lt;/td&gt;
&lt;td headers='id0886_c2'&gt;error : titre de l'erreur,&lt;br class='autobr' /&gt;
error_description : description de l'erreur&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;La r&#233;ponse HTTP ainsi que les valeurs de error et error_description sont donn&#233;es par le tableau suivant :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;&lt;strong&gt;R&#233;ponse&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;error&lt;br class='autobr' /&gt;
titre de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;error_description&lt;br class='autobr' /&gt;
description de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Explication&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;302&lt;/td&gt;
&lt;td&gt;login required&lt;/td&gt;
&lt;td&gt;The user must log in&lt;/td&gt;
&lt;td&gt;Le jeton d'acc&#232;s n'existe pas ou n'est plus valide. Cette r&#233;ponse n'apparait que si login='none' car, dans les autres cas, le serveur OAuthSD prend &#224; sa charge le dialogue de connexion. Cette erreur pourra appara&#238;tre en cas d'&#233;checs successifs.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;302&lt;/td&gt;
&lt;td&gt;interaction_required&lt;/td&gt;
&lt;td&gt;The user must grant access to your application&lt;/td&gt;
&lt;td&gt;Le serveur a d&#233;termin&#233; que des scopes doivent &#234;tre approuv&#233;s par l'utilisateur final. Il y a peu de chance que cette erreur apparaisse avec OAuthSD, car la situation est g&#233;r&#233;e au niveau du contr&#244;leur Authorize qui prend &#224; sa charge le formulaire d'acceptation.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;302&lt;/td&gt;
&lt;td&gt;consent_required&lt;/td&gt;
&lt;td&gt;The user denied access to your application&lt;/td&gt;
&lt;td&gt;L'utilisateur final a explicitement refus&#233; la demande d'autorisation qui lui a &#233;t&#233; pr&#233;sent&#233;e.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_client&lt;/td&gt;
&lt;td&gt;No client id supplied&lt;/td&gt;
&lt;td&gt;Le param&#232;tre client_id est obligatoire.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_client&lt;/td&gt;
&lt;td&gt;The client id supplied is invalid&lt;/td&gt;
&lt;td&gt;Le param&#232;tre client_id doit &#234;tre identique &#224; ce qui a &#233;t&#233; inscrit pour l'application.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_uri&lt;/td&gt;
&lt;td&gt;The redirect URI must not contain a fragment&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_uri&lt;/td&gt;
&lt;td&gt;No redirect URI was supplied or stored&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_uri&lt;/td&gt;
&lt;td&gt;A redirect URI must be supplied when multiple redirect URIs are registered&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;redirect_uri_mismatch&lt;/td&gt;
&lt;td&gt;The redirect URI provided is missing or does not match&lt;/td&gt;
&lt;td&gt;Le param&#232;tre redirect_uri doit &#234;tre identique &#224; ce qui a &#233;t&#233; inscrit pour l'application.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_uri&lt;/td&gt;
&lt;td&gt;The redirect URI must not contain a fragment&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;missing_code_challenge&lt;/td&gt;
&lt;td&gt;This application requires you provide a PKCE code challenge&lt;/td&gt;
&lt;td&gt;Voir &lt;a href='https://static.oa.dnc.global/-Authentifier-l-application-.html#cledeverificationpourlechangedecodepkce' class='spip_in'&gt;Cl&#233; de v&#233;rification pour l'&#233;change de code (PKCE)&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;not_allowed&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;L'utilisateur final a probablement fait une erreur dans ses identifiants. Recommencer.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;malformed_identifier&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;L'utilisateur final a fourni un identifiant (e-mail ou pseudo) mal form&#233;. Recommencer.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;malformed_email&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Un E-mail est requis en guise d'identifiant de l'utilisateur final. L'utilisateur final a probablement fait une erreur. Recommencer.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;403&lt;/td&gt;
&lt;td&gt;consent_required&lt;/td&gt;
&lt;td&gt;The user denied access to your application&lt;/td&gt;
&lt;td&gt;L'utilisateur a refus&#233; son accord ou a abandonn&#233; l'authentification.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;403&lt;/td&gt;
&lt;td&gt;forbidden&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Probablement une attaque de type &#034;Man in the middle&#034;. Ne pas r&#233;agir.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Si le serveur retourne une erreur 401, il est de la responsabilit&#233; de l'application cliente de pr&#233;senter un message d'erreur &#224; l'utilisateur final et de recommencer (ou non) l'authentification. Dans tous les autres cas d'erreur, l'application cliente ne devrait pas redemander l'authentification avant d'avoir identifi&#233; l'erreur au niveau technique.&lt;/p&gt;
&lt;p&gt;Dans certains cas, la redirection peut &#234;tre effectu&#233;e, le corps de la r&#233;ponse contenant un message d'erreur :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;&lt;strong&gt;error&lt;br class='autobr' /&gt;
titre de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;error_description&lt;br class='autobr' /&gt;
description de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Explication&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;invalid_request&lt;/td&gt;
&lt;td&gt;Invalid or missing response type&lt;/td&gt;
&lt;td&gt;response_type doit &#234;tre &#034;code&#034;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;unauthorized_client&lt;/td&gt;
&lt;td&gt;The grant type is unauthorized for this client_id&lt;/td&gt;
&lt;td&gt;V&#233;rifiez que l'application a bien &#233;t&#233; inscrite avec le type d'autorisation Authorization_code&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;redirect_uri_mismatch&lt;/td&gt;
&lt;td&gt;The redirect URI is mandatory and was not supplied&lt;/td&gt;
&lt;td&gt;Le param&#232;tre redirect_uri doit figurer dans la requ&#234;te.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;h3 class=&#034;spip&#034;&gt;R&#233;ponse sans redirection&lt;/h3&gt;
&lt;p&gt;Un certain nombre d'erreurs provoquent une r&#233;ponse HTTP directe (sans rediriger le navigateur sur le point d'extr&#233;mit&#233; de redirection). Il s'agit d'anomalies dans la requ&#234;te, traduisant une tentative d'intrusion. Le code d'erreur HTTP est le plus souvent 400 'Bad Request' ou 403 'Forbidden'. &lt;br class='autobr' /&gt;
Ce type d'erreur ne devrait jamais se produire avec une application cliente autoris&#233;e. Le concepteur d'une application cliente n'a pas &#224; s'en pr&#233;occuper.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>API OpenID Connect : Point d'extr&#233;mit&#233; de jeton (Token Endpoint)</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedejetontokenendpoint</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedejetontokenendpoint</guid>
		<dc:date>2018-04-12T09:32:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Pour obtenir les jetons, une application cliente s'adresse au point d'extr&#233;mit&#233; token avec le code obtenu dans la phase d'autorisation. Dans le cadre du protocole OpenID Connect, l'appel au contr&#244;leur Token suit la demande d'authentification. Point d'extr&#233;mit&#233; de jeton (Token Endpoint) &lt;br class='autobr' /&gt;
https://oa.dnc.global/token &lt;br class='autobr' /&gt;
Le point d'extr&#233;mit&#233; de jeton est le point d'extr&#233;mit&#233; sur le serveur d'autorisation auquel s'adresse l'application cliente avec le code d'autorisation. &lt;br class='autobr' /&gt;
Forme de la demande de jeton d'acc&#232;s dans (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Pour obtenir les jetons, une application cliente s'adresse au point d'extr&#233;mit&#233; token avec le code obtenu dans la phase d'autorisation. Dans le cadre du protocole OpenID Connect, l'appel au contr&#244;leur Token suit la &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#openidconnectobteniruneautorisationpourlapplicationcliente' class='spip_in'&gt;demande d'authentification&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Point d'extr&#233;mit&#233; de jeton (Token Endpoint)&lt;/h3&gt;
&lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/token&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Le point d'extr&#233;mit&#233; de jeton est le point d'extr&#233;mit&#233; sur le serveur d'autorisation auquel s'adresse l'application cliente avec le code d'autorisation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Forme de la demande de jeton d'acc&#232;s dans le cadre du flux Authorization Code Grant&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;La demande ne doit &#234;tre effectu&#233;e que par la m&#233;thode POST.&lt;br class='autobr' /&gt;
Les param&#232;tres suivants doivent &#234;tre post&#233;s :
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; grant_type : (OBLIGATOIRE) Type de flux d'autorisation, doit &#234;tre &#034;authorization_code&#034;.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; code : (OBLIGATOIRE) le code d'autorisation re&#231;u.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; redirect_uri : (OPTIONNEL) l'adresse de retour &#224; l'application cliente. Si cette valeur est fournie, elle doit correspondre &#224; l'une des valeurs inscrites pour le client. Si cette valeur est omise, la valeur unique inscrite pour le client sera utilis&#233;e.&lt;/p&gt;
&lt;p&gt;Pour l'authentification de l'application cliente aupr&#232;s du serveur d'autorisation, OAuthSD accepte les m&#233;thodes 'client_secret_basic' et 'client_secret_post'&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb4-1' class='spip_note' rel='appendix' title='Dans l'&#233;tat actuel du d&#233;veloppement, les m&#233;thodes 'private_key_jwt', (...)' id='nh4-1'&gt;1&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Authentification du client par 'client_secret_basic'&lt;/strong&gt;&lt;br class='autobr' /&gt;
L'authentification est effectu&#233;e en utilisant l'authentification HTTP Basic (cf. section 2.3.1 de OAuth 2.0 [RFC6749]).&lt;/p&gt;
&lt;p&gt;Exemple de construction de l'ent&#234;te Authorize avec PHP cURL :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Token request&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'grant_type'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'authorization_code'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'code'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;h &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$oidc_token_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_USERPWD&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;&lt;span style=&#034;color: #006699; font-weight: bold;&#034;&gt;{$client_id}&lt;/span&gt;:&lt;span style=&#034;color: #006699; font-weight: bold;&#034;&gt;{$client_secret}&lt;/span&gt;&#034;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;//curl_setopt($h, CURLOPT_SSL_VERIFYPEER, false);&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res1&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$errorc1&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_error&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_error&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_close&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_close&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/299c1912f0ebcf567002407191f46d94.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Authentification du client par 'client_secret_post'&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Les identifiants client_id et client_secret qui ont &#233;t&#233; d&#233;finis lors de l'inscription de l'application cliente sur le serveur sont pass&#233;s dans le corps de la requ&#234;te.&lt;/p&gt;
&lt;p&gt;Exemple avec PHP cUrl :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// Token request&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'client_id'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$client_id&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'client_secret'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$client_secret&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'grant_type'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'authorization_code'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'code'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$code&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$oidc_token_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;//curl_setopt($h, CURLOPT_SSL_VERIFYPEER, false);&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res1&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$errorc1&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_error&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_error&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;a href=&#034;http://www.php.net/curl_close&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_close&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/044a86af36012ba4754e741f8abc3877.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;Autres flux&lt;/h3&gt;
&lt;p&gt;Notons que OAuth 2.0 d&#233;finit des flux effectuant un appel direct au contr&#244;leur Token, voir : &lt;a href='https://static.oa.dnc.global/-Decouvrir-.html#openidconnectetoauth20synthesedesfluxdautorisationgranttype' class='spip_in'&gt;diff&#233;rents type de flux&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Notons &#233;galement que le flux implicite d&#233;fini dans le cadre d'OpenID Connect obtient directement les jetons du contr&#244;leur Authorize.&lt;/p&gt;
&lt;p&gt;Certains auteurs d&#233;finissent dans le cadre d'OAuth 2.0 un flux &#034;Refresh Token Grant&#034; s'adressant au point d'extr&#233;mit&#233; de jeton. Il ne s'agit pas &#224; proprement parler d'un flux puisque, prolongeant un flux d'autorisation &#233;tabli pr&#233;c&#233;demment, il ne peut exister de fa&#231;on autonome et donc contredit la nature REST de l'API. Voir : &lt;a href='https://static.oa.dnc.global/-Gestion-du-jeton-d-acces-.html#rafraichiractualiserunjetondacces' class='spip_in'&gt;Rafra&#238;chir (actualiser) un jeton d'acc&#232;s&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;R&#233;ponse du serveur&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;En cas de succ&#232;s&lt;/strong&gt;, le serveur retourne une r&#233;ponse HTTP 200. Le corps de la r&#233;ponse contient :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='id78c6_c0'&gt; index &lt;/th&gt;&lt;th id='id78c6_c1'&gt; type &lt;/th&gt;&lt;th id='id78c6_c2'&gt; valeur &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='id78c6_c0'&gt;page&lt;/td&gt;
&lt;td headers='id78c6_c1'&gt;JSON array&lt;/td&gt;
&lt;td headers='id78c6_c2'&gt;access_token : (string) jeton d'acc&#232;s OAuth 2.0&lt;br class='autobr' /&gt;
expires_in : (long) dur&#233;e de vie en secondes&lt;br class='autobr' /&gt;
token_type : (string) &#034;Bearer&#034;&lt;br class='autobr' /&gt;
scope : (string) &#034;openid ... &#034;&lt;br class='autobr' /&gt;
id_token : (string) jeton d'identification (JWT)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Le Header comporte, comme il se doit, la directive 'Cache-Control : no-cache, no-store'.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;En cas d'&#233;chec&lt;/strong&gt;, le corps de la r&#233;ponse contient :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='id0886_c0'&gt; index &lt;/th&gt;&lt;th id='id0886_c1'&gt; type &lt;/th&gt;&lt;th id='id0886_c2'&gt; valeur &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='id0886_c0'&gt;page&lt;/td&gt;
&lt;td headers='id0886_c1'&gt;JSON Array&lt;/td&gt;
&lt;td headers='id0886_c2'&gt;error : titre de l'erreur,&lt;br class='autobr' /&gt;
error_description : description de l'erreur&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;La r&#233;ponse HTTP ainsi que les valeurs de error et error_description sont donn&#233;es par le tableau suivant :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;&lt;strong&gt;R&#233;ponse&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;error&lt;br class='autobr' /&gt;
titre de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;error_description&lt;br class='autobr' /&gt;
description de l'erreur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Explication&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;405&lt;/td&gt;
&lt;td&gt;invalid_request&lt;/td&gt;
&lt;td&gt;The request method must be POST when requesting an access token&lt;/td&gt;
&lt;td&gt;La m&#233;thode de la demande doit &#234;tre POST lorsque vous demandez un jeton d'acc&#232;s. Notez que le Header contient 'Allow : POST'&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_request&lt;/td&gt;
&lt;td&gt;The grant type was not specified in the request&lt;/td&gt;
&lt;td&gt;Le &lt;a href='https://static.oa.dnc.global/-OAuth-2-0-.html#oauth20lestypesdautorisationgranttype' class='spip_in'&gt;type d'autorisation&lt;/a&gt; n'a pas &#233;t&#233; sp&#233;cifi&#233; dans la demande&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;unsupported_grant_type&lt;/td&gt;
&lt;td&gt;Grant type &#034;X&#034; not supported&lt;/td&gt;
&lt;td&gt;Le Type d'autorisation &#034;X&#034; n'est pas support&#233;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_grant&lt;/td&gt;
&lt;td&gt;Authorization code doesn\'t exist or is invalid for the client&lt;/td&gt;
&lt;td&gt;Le code d'autorisation n'existe pas ou est invalide pour le client. Cette situation peut r&#233;sulter du fait que le code a d&#233;j&#224; &#233;t&#233; utilis&#233; pour une demande de jeton.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;unauthorized_client&lt;/td&gt;
&lt;td&gt;The grant type is unauthorized for this client_id&lt;/td&gt;
&lt;td&gt;Le type d'autorisation n'est pas autoris&#233; pour ce client_id&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_scope&lt;/td&gt;
&lt;td&gt;The scope requested is invalid for this request&lt;/td&gt;
&lt;td&gt;La &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#porteedelautorisationscope' class='spip_in'&gt;port&#233;e d'autorisation&lt;/a&gt; demand&#233;e est invalide pour cette demande&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_scope&lt;/td&gt;
&lt;td&gt;The scope requested is invalid for this client&lt;/td&gt;
&lt;td&gt;La port&#233;e d'autorisation demand&#233;e est valide pour ce client&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;invalid_scope&lt;/td&gt;
&lt;td&gt;An unsupported scope was requested&lt;/td&gt;
&lt;td&gt;La port&#233;e d'autorisation demand&#233;e n'est pas support&#233;e&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;h3 class=&#034;spip&#034;&gt;Demande du jeton de rafra&#238;chissement&lt;/h3&gt;
&lt;p&gt;OpenID Connect ne retourne un jeton de rafra&#238;chissement (Refresh Token), conjointement au jeton d'acc&#232;s, que si le scope &#034;offline_access&#034; a &#233;t&#233; inclus dans la requ&#234;te et accept&#233;, ce qui ne se produira qu'avec le flux d'Autorisation via un code (Authorization Code Grant).&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb4-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh4-1' class='spip_note' title='Notes 4-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;Dans l'&#233;tat actuel du d&#233;veloppement, les m&#233;thodes 'private_key_jwt', 'client_secret_jwt' et 'none' ne sont pas impl&#233;ment&#233;es de fa&#231;on stable.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>API OpenID Connect : D&#233;couverte</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectdecouverte</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectdecouverte</guid>
		<dc:date>2017-01-06T18:16:08Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Le protocole OpenID Connect n&#233;cessite l'utilisation de plusieurs points d'extr&#233;mit&#233; pour authentifier les utilisateurs et pour demander des ressources, y compris des jetons, des informations sur l'utilisateur et des cl&#233;s publiques. &lt;br class='autobr' /&gt;
Comment un serveur de ressource ind&#233;pendant du serveur d'autorisation peut-il conna&#238;tre les fonctionnalit&#233;s du serveur et y acc&#233;der ? &lt;br class='autobr' /&gt;
Le document de d&#233;couverte &lt;br class='autobr' /&gt;
Conform&#233;ment &#224; la sp&#233;cification OpenID Connect Discovery 1.0, OAuthSD expose ses m&#233;tadonn&#233;es &#224; l'URI : (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L128xH128/arton56-69215.png?1733821221' width='128' height='128' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;Le protocole OpenID Connect n&#233;cessite l'utilisation de plusieurs points d'extr&#233;mit&#233; pour authentifier les utilisateurs et pour demander des ressources, y compris des jetons, des informations sur l'utilisateur et des cl&#233;s publiques.&lt;/p&gt;
&lt;p&gt;Comment un serveur de ressource ind&#233;pendant du serveur d'autorisation peut-il conna&#238;tre les fonctionnalit&#233;s du serveur et y acc&#233;der ?&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Le document de d&#233;couverte&lt;/h3&gt;
&lt;p&gt;Conform&#233;ment &#224; la sp&#233;cification &lt;a href=&#034;http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata&#034; class='spip_out' rel='external'&gt;OpenID Connect Discovery 1.0&lt;/a&gt;, OAuthSD expose ses m&#233;tadonn&#233;es &#224; l'URI :&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;https://oa.dnc.global/.well-known/openid-configuration&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Voici un exemple (non stable) des m&#233;tadonn&#233;es fournies au format JSON :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[JSON]&lt;/strong&gt;&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;{&lt;br /&gt; &#034;issuer&#034; : &#034;https://oa.dnc.global&#034;,&lt;br /&gt; &#034;token_endpoint&#034; : &#034;https://oa.dnc.global/token&#034;,&lt;br /&gt; &#034;introspection_endpoint&#034; : &#034;https://oa.dnc.global/introspect&#034;,&lt;br /&gt; &#034;revocation_endpoint&#034; : &#034;https://oa.dnc.global/revoke&#034;,&lt;br /&gt; &#034;authorization_endpoint&#034; : &#034;https://oa.dnc.global/authorize&#034;,&lt;br /&gt; &#034;userinfo_endpoint&#034; : &#034;https://oa.dnc.global/userinfo&#034;,&lt;br /&gt; &#034;jwks_uri&#034; : &#034;https://oa.dnc.global/keys&#034;,&lt;br /&gt; &#034;scopes_supported&#034; : [ &#034;openid&#034;,&lt;br /&gt; &#034;profile&#034;,&lt;br /&gt; &#034;email&#034;,&lt;br /&gt; &#034;address&#034;,&lt;br /&gt; &#034;phone&#034;],&lt;br /&gt; &#034;response_types_supported&#034; : [ &#034;code&#034;,&lt;br /&gt; &#034;id_token&#034;,&lt;br /&gt; &#034;token id_token&#034;,&lt;br /&gt; &#034;id_token token&#034;,&lt;br /&gt; &#034;code id_token&#034; ,&lt;br /&gt; &#034;code token id_token&#034; ],&lt;br /&gt; &#034;response_modes_supported&#034; : [ &#034;query&#034;,&lt;br /&gt; &#034;fragment&#034;,&lt;br /&gt; &#034;form_post&#034; ],&lt;br /&gt; &#034;grant_types_supported&#034; : [ &#034;authorization_code&#034;,&lt;br /&gt; &#034;refresh_token&#034;,&lt;br /&gt; &#034;password&#034;,&lt;br /&gt; &#034;client_credentials&#034;,&lt;br /&gt; &#034;urn:ietf:params:oauth:grant-type:jwt-bearer&#034;], &lt;br /&gt; &#034;code_challenge_methods_supported&#034; : [ &#034;S256&#034;,&lt;br /&gt; &#034;plain&#034; ],&lt;br /&gt; &#034;subject_types_supported&#034; : [ &#034;public&#034; ], &lt;br /&gt; &#034;token_endpoint_auth_methods_supported&#034; : [ &#034;client_secret_basic&#034;,&lt;br /&gt; &#034;client_secret_post&#034;,&lt;br /&gt; &#034;client_secret_jwt&#034;,&lt;br /&gt; &#034;private_key_jwt&#034; ], &lt;br /&gt; &#034;token_endpoint_auth_signing_alg_values_supported&#034; : &lt;br /&gt; [ &#034;HS256&#034;,&lt;br /&gt; &#034;HS512&#034;,&lt;br /&gt; &#034;HS384&#034;,&lt;br /&gt; &#034;RS256&#034;,&lt;br /&gt; &#034;RS384&#034;,&lt;br /&gt; &#034;RS512&#034;], &lt;br /&gt; &#034;id_token_signing_alg_values_supported&#034; : [ &#034;RS256&#034;,&lt;br /&gt; &#034;RS384&#034;,&lt;br /&gt; &#034;RS512&#034;,&lt;br /&gt; &#034;HS256&#034;,&lt;br /&gt; &#034;HS384&#034;,&lt;br /&gt; &#034;HS512&#034; ],&lt;br /&gt; &#034;userinfo_signing_alg_values_supported&#034; : [ &#034;RS256&#034;,&lt;br /&gt; &#034;RS384&#034;,&lt;br /&gt; &#034;RS512&#034;,&lt;br /&gt; &#034;HS256&#034;,&lt;br /&gt; &#034;HS384&#034;,&lt;br /&gt; &#034;HS512&#034; ], &lt;br /&gt; &#034;claim_types_supported&#034; : [ &#034;normal&#034; ], &lt;br /&gt; &#034;claims_supported&#034; : [ &#034;sub&#034;,&lt;br /&gt; &#034;iss&#034;,&lt;br /&gt; &#034;auth_time&#034;,&lt;br /&gt; &#034;acr&#034;,&lt;br /&gt; &#034;name&#034;,&lt;br /&gt; &#034;given_name&#034;,&lt;br /&gt; &#034;family_name&#034;,&lt;br /&gt; &#034;nickname&#034;,&lt;br /&gt; &#034;email&#034;,&lt;br /&gt; &#034;email_verified&#034; ],&lt;br /&gt; &#034;ui_locales_supported&#034; : [ &#034;fr&#034; ], &lt;br /&gt; &#034;claims_parameter_supported&#034; : true, &lt;br /&gt; &#034;request_parameter_supported&#034; : false,&lt;br /&gt; &#034;request_uri_parameter_supported&#034; : false,&lt;br /&gt; &#034;require_request_uri_registration&#034; : false&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Voir &#233;galement :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedinformationssurlesclefskeysendpoint' class='spip_in'&gt;API OpenId Connect : Point d'extr&#233;mit&#233; d'informations sur les clefs (Keys Endpoint)&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>API OpenID Connect : Points d'extr&#233;mit&#233;</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointsdextremite</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointsdextremite</guid>
		<dc:date>2016-12-31T08:45:32Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Les points d'extr&#233;mit&#233; d'OpenID Connect jouent un r&#244;le semblable &#224; ceux du protocole OAuth 2.0 mais sont plus complets. &lt;br class='autobr' /&gt;
Points d'extr&#233;mit&#233; d&#233;finis par OpenID Connect &lt;br class='autobr' /&gt;
Le point d'extr&#233;mit&#233; d'autorisation et le point d'extr&#233;mit&#233; de jeton sont tous deux situ&#233;s sur le serveur d'autorisation (ce serveur). &lt;br class='autobr' /&gt;
Le point d'extr&#233;mit&#233; de redirection est situ&#233; dans l'application cliente. Il revient donc &#224; l'administrateur de cette application de d&#233;velopper le code du point d'extr&#233;mit&#233; de redirection. &lt;br class='autobr' /&gt;
La sp&#233;cification (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://static.oa.dnc.global/local/cache-vignettes/L128xH128/arton50-c8555.png?1733821221' width='128' height='128' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;Les points d'extr&#233;mit&#233; d'OpenID Connect jouent un r&#244;le semblable &#224; ceux du protocole OAuth 2.0 mais sont plus complets.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Points d'extr&#233;mit&#233; d&#233;finis par OpenID Connect&lt;/h3&gt;
&lt;p&gt;Le point d'extr&#233;mit&#233; d'autorisation et le point d'extr&#233;mit&#233; de jeton sont tous deux situ&#233;s sur le serveur d'autorisation (ce serveur).&lt;/p&gt;
&lt;p&gt;Le point d'extr&#233;mit&#233; de redirection est situ&#233; dans l'application cliente. Il revient donc &#224; l'administrateur de cette application de d&#233;velopper le code du point d'extr&#233;mit&#233; de redirection.&lt;/p&gt;
&lt;p&gt;La sp&#233;cification d'OpenID Connect ne d&#233;crit pas comment l'URI de ces points d'extr&#233;mit&#233; est d&#233;finie. C'est &#224; chaque d&#233;veloppeur de d&#233;cider. Cependant, l'observation de diff&#233;rents serveurs permet de d&#233;gager des options courantes, que nous avons adopt&#233;es.&lt;/p&gt;
&lt;p&gt;Notons que OpenID Connect pr&#233;voit la d&#233;couverte des points d'extr&#233;mit&#233;s, ce que OAuthSD impl&#233;mente &#224; cette URL : [&lt;a href=&#034;http://oa.dnc.global/.well-known/openid-configuration&#034; class='spip_url spip_out auto' rel='nofollow external'&gt;http://oa.dnc.global/.well-known/openid-configuration&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;Voici comment OAuthSD d&#233;finit les points d'extr&#233;mit&#233; du protocole OpenID Connect :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedautorisationauthorizationendpoint' class='spip_in'&gt;Point d'extr&#233;mit&#233; d'autorisation (Authorization Endpoint)&lt;/a&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/authorize&lt;/code&gt;&lt;br class='autobr' /&gt;
Usage dans le cadre du flux Autorisation via un code : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#openidconnectobteniruneautorisationpourlapplicationcliente' class='spip_in'&gt;OpenID Connect : Obtenir une autorisation pour l'application cliente&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Le point d'extr&#233;mit&#233; d'autorisation est le point d'extr&#233;mit&#233; sur le serveur d'autorisation auquel l'agent de l'utilisateur final (user-agent : le navigateur ou l'application mobile etc.) est redirig&#233; par l'application cliente, pour permettre &#224; l'utilisateur final de s'authentifier et d'accorder les autorisations demand&#233;es par l'application cliente.&lt;/p&gt;
&lt;p&gt;Lors du traitement de la demande d'authentification, le serveur cr&#233;e un jeton d'acc&#232;s et un jeton d'identification. Ces jetons seront associ&#233;s &#224; l'ID de l'utilisateur final, ce qui ouvre une notion de session.&lt;/p&gt;
&lt;p&gt;Dans le cas du flux d'autorisation via un code (celui qui nous int&#233;resse le plus), &#224; ce stade, il n'est retourn&#233; qu'un code d'autorisation de dur&#233;e de vie tr&#232;s courte&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb5-1' class='spip_note' rel='appendix' title='Nous pr&#233;voyons de le rendre &#224; usage unique. Il ne semble pas que la norme le (...)' id='nh5-1'&gt;1&lt;/a&gt;]&lt;/span&gt;. Les jetons ne seront retourn&#233;s qu'en r&#233;ponse &#224; l'appel du point d'extr&#233;mit&#233; token, dans une liaison serveur-serveur, ce qui fonde la s&#233;curit&#233; de ce flux.&lt;/p&gt;
&lt;p&gt;Dans le cas des flux implicites et hybrides, utilis&#233;s pour des applications sans serveur (back-end), les jetons sont directement retourn&#233;s dans la r&#233;ponse et sont donc visibles par l'agent de l'utilisateur, ce qui est consid&#233;r&#233; comme une faiblesse de ces flux.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Point d'extr&#233;mit&#233; de redirection, ou URI de retour &#224; l'application cliente (Redirection Endpoint)&lt;/strong&gt;&lt;br class='autobr' /&gt;
Le point d'extr&#233;mit&#233; de redirection est le point d'extr&#233;mit&#233; dans l'application cliente vers lequel l'agent de l'utilisateur est redirig&#233;, apr&#232;s avoir obtenu l'autorisation au point d'extr&#233;mit&#233; d'autorisation. Cet URI est d&#233;fini par l'administrateur d'une application cliente quand il l'inscrit sur ce serveur. Voir : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-6-.html#openidconnectlieruneapplicationclienteauserveuroauthsd' class='spip_in'&gt;OpenID Connect : Lier une application cliente au serveur OAuthSD&lt;/a&gt;. Ce point d'extr&#233;mit&#233; pourrait &#234;tre distinct de celui du protocole OAuth 2.0 car OpenID Connect pr&#233;voit des &#233;changes diff&#233;rents et requiert que le jeton obtenu soit v&#233;rifi&#233; par l'application cliente. Cet article explique comment faire : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#openidconnectexemplescompletsdufluxdautorisationviauncodepuisrequeteuserinfo' class='spip_in'&gt;OpenID Connect : Exemples complets du flux d'Autorisation via un code puis requ&#234;te UserInfo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedejetontokenendpoint' class='spip_in'&gt;Point d'extr&#233;mit&#233; de jeton (Token Endpoint)&lt;/a&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/token&lt;/code&gt;&lt;br class='autobr' /&gt;
Usage dans le cadre du flux Autorisation via un code : &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#openidconnectobtenirlesjetonsdacces' class='spip_in'&gt;OpenID Connect : Obtenir les jetons d'acc&#232;s&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Le point d'extr&#233;mit&#233; de jeton est le point d'extr&#233;mit&#233; sur le serveur d'autorisation auquel s'adresse l'application cliente, avec le code d'autorisation et l'ID client, pour obtenir un jeton d'acc&#232;s et un jeton d'identit&#233; ou rafra&#238;chir des jetons ayant expir&#233;.&lt;/p&gt;
&lt;p&gt;Le &lt;strong&gt;jeton d'acc&#232;s&lt;/strong&gt; est utilis&#233; pour effectuer des appels authentifi&#233;s vers une API s&#233;curis&#233;e, tandis que le &lt;strong&gt;jeton d'identification &lt;/strong&gt; contient des attributs de profil utilisateur repr&#233;sent&#233;s sous la forme de d&#233;clarations (claims). Les deux JWT ont une date d'expiration indiqu&#233;e par la revendication exp (parmi d'autres mesures de s&#233;curit&#233;, comme la signature).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectintrospectionintrospectionendpoint' class='spip_in'&gt;Point d'extr&#233;mit&#233; d'introspection (Introspection Endpoint)&lt;/a&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/introspect&lt;/code&gt;&lt;br class='autobr' /&gt;
Usage : &lt;a href=&#034;https://oa.dnc.global/web/-API-OpenID-Connect-Points-d-extremite-.html#oidcformedemandeintrospection&#034; class='spip_out' rel='external'&gt;Demande d'introspection&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;La &#034;norme&#034; OpenID Connect ne d&#233;finit pas l'introspection. En effet, dans une approche simpliste, OpenID Connect ne prot&#232;ge que les donn&#233;es UserInfo qui, &#233;tant situ&#233;es sur le m&#234;me serveur d'authentification, ne n&#233;cessitent pas l'introspection. &lt;br class='autobr' /&gt;
Mais si on souhaite utiliser OpenID Connect pour acc&#233;der &#224; des donn&#233;es prot&#233;g&#233;es situ&#233;es sur un serveur de ressource distinct du serveur d'authentification, l'introspection est une des deux m&#233;thodes applicables pour permettre &#224; ce serveur de &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-6-.html#validationdujetondidentiteidtokenjwtsigneoujws' class='spip_in'&gt;valider le jeton JWT&lt;/a&gt;. La probl&#233;matique g&#233;n&#233;rale est expos&#233;e ici : &lt;a href='https://static.oa.dnc.global/-OAuth-2-0-.html#validationdujetonparuneressourceprotegee' class='spip_in'&gt;Validation du jeton par une ressource prot&#233;g&#233;e&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Notons que l'introspection n'est pas une particularit&#233; d'OAuthSD, d'autres impl&#233;mentations offrant &#233;galement cette fonctionnalit&#233;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Point d'extr&#233;mit&#233; d'informations sur l'utilisateur final (UserInfo)&lt;/strong&gt;&lt;br class='autobr' /&gt;
&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/userinfo&lt;/code&gt;&lt;br class='autobr' /&gt;
Pour r&#233;aliser l'authentification, le protocole OpenID Connect permet &#224; une application cliente d'acc&#233;der &#224; l'identit&#233; de l'utilisateur final ayant accord&#233; l'autorisation, ainsi qu'&#224; diff&#233;rentes informations selon le scope pass&#233; dans la requ&#234;te. &lt;br class='autobr' /&gt;
Usage :
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#demandedinformationssurlutilisateuruserinfoendpoint' class='spip_in'&gt;Demande d'informations sur l'utilisateur (UserInfo Endpoint)&lt;/a&gt;,
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#reponseuserinfo' class='spip_in'&gt;R&#233;ponse UserInfo&lt;/a&gt;.&lt;br class='autobr' /&gt;
R&#233;f&#233;rences :
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;a href=&#034;http://openid.net/specs/openid-connect-core-1_0.html#UserInfo&#034; class='spip_out' rel='external'&gt;UserInfo Endpoint&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Point d'extr&#233;mit&#233; d'informations sur les clefs (Keys Endpoint)&lt;/strong&gt;&lt;br class='autobr' /&gt;
Ce point permet &#224; un serveur de ressource d'acc&#233;der &#224; la cl&#233; publique qui lui permettra de valider le jeton d'identit&#233;, comme expos&#233; dans cet article : &lt;a href='https://static.oa.dnc.global/-OAuth-2-0-.html#validationdujetonparuneressourceprotegee' class='spip_in'&gt;Validation du jeton par une ressource prot&#233;g&#233;e&lt;/a&gt;.&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;https://oa.dnc.global/keys&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Ce sujet est trait&#233; plus en d&#233;tail ici : &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectpointdextremitedinformationssurlesclefskeysendpoint' class='spip_in'&gt;API OpenId Connect : Point d'extr&#233;mit&#233; d'informations sur les clefs (Keys Endpoint)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Point d'extr&#233;mit&#233; de d&#233;connexion (Logout Endpoint)&lt;/strong&gt;&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;https://oa.dnc.global/logout.php&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Ce point permet la d&#233;connexion de l'utilisateur au niveau du serveur de toutes ses sessions s&#233;curis&#233;es. Si un cookie SLI avait &#233;t&#233; g&#233;n&#233;r&#233;, il est d&#233;truit, interdisant ainsi le rafra&#238;chissement automatique des sessions de l'utilisateur ouvertes &#224; partir d'autres applications.&lt;br class='autobr' /&gt;
L'appel de Logout se fait exactement comme Introspect, avec un jeton d'identit&#233; valide.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D&#233;couverte des points d'extr&#233;mit&#233;&lt;/strong&gt;&lt;br class='autobr' /&gt;
Conform&#233;ment &#224; la sp&#233;cification &lt;a href=&#034;http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata&#034; class='spip_out' rel='external'&gt;OpenID Connect Discovery 1.0&lt;/a&gt;, OAuthSD expose ses m&#233;tadonn&#233;es &#224; l'URI :&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;https://oa.dnc.global/.well-known/openid-configuration&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Ce sujet est trait&#233; plus en d&#233;tail ici : &lt;a href='https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectdecouverte' class='spip_in'&gt;API OpenID Connect : D&#233;couverte&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb5-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh5-1' class='spip_note' title='Notes 5-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;Nous pr&#233;voyons de le rendre &#224; usage unique. Il ne semble pas que la norme le pr&#233;voit, est-ce convenable ?&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Demande d'informations sur l'utilisateur (UserInfo Endpoint)</title>
		<link>https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#demandedinformationssurlutilisateuruserinfoendpoint</link>
		<guid isPermaLink="true">https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#demandedinformationssurlutilisateuruserinfoendpoint</guid>
		<dc:date>2016-11-12T10:55:57Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Le point d'extr&#233;mit&#233; UserInfo du protocole OpenID Connect permet d'obtenir des informations sur l'utilisateur final authentifi&#233;. Point d'extr&#233;mit&#233; UserInfo &lt;br class='autobr' /&gt;
L'URI est la suivante : &lt;br class='autobr' /&gt;
https://oa.dnc.global/userinfo &lt;br class='autobr' /&gt;
Contr&#244;le de l'acc&#232;s &lt;br class='autobr' /&gt;
Les demandes adress&#233;es au point de terminaison UserInfo doivent &#234;tre authentifi&#233;es avec les informations d'identification du client (Client Credentials Grant) ou autoris&#233;es avec un jeton d'acc&#232;s au porteur (Bearer Token).
&lt;br class='autobr' /&gt;
En cons&#233;quence, l'application appelante (ou le serveur (...)&lt;/p&gt;


-
&lt;a href="https://static.oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html" rel="directory"&gt;API OpenID Connect : Points d'extr&#233;mit&#233;&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Le point d'extr&#233;mit&#233; UserInfo du protocole OpenID Connect permet d'obtenir des informations sur l'utilisateur final authentifi&#233;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Point d'extr&#233;mit&#233; UserInfo&lt;/h3&gt;
&lt;p&gt;L'URI est la suivante :&lt;/p&gt;
&lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/userinfo&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contr&#244;le de l'acc&#232;s&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Les demandes adress&#233;es au point de terminaison UserInfo doivent &#234;tre authentifi&#233;es avec les informations d'identification du client (Client Credentials Grant) ou autoris&#233;es avec un jeton d'acc&#232;s au porteur (Bearer Token).&lt;br class='autobr' /&gt;
En cons&#233;quence, l'application appelante (ou le serveur de ressource) doit &#234;tre enregistr&#233;e comme cliente sur le serveur d'authentification. &lt;br class='autobr' /&gt;
S'agissant d'une sp&#233;cification d'OpenID Connect, l'application appelante doit avoir &#233;t&#233; enregistr&#233;e avec le scope r&#233;serv&#233; 'openid'.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Client Credentials Grant&lt;/strong&gt;&lt;br class='autobr' /&gt;
C'est l'approche la plus simple. &lt;br class='autobr' /&gt;
L'application appelante (ou le serveur de ressource) doit &#234;tre enregistr&#233;e comme cliente sur le serveur d'authentification.&lt;br class='autobr' /&gt;
L'authentification est effectu&#233;e en utilisant l'authentification HTTP Basic (cf. section 2.3.1 de OAuth 2.0 [RFC6749]). Les identifiants client_id et client_secret sont ceux qui ont &#233;t&#233; d&#233;finis lors de l'inscription de l'application cliente sur le serveur.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bearer Token&lt;/strong&gt;&lt;br class='autobr' /&gt;
Cette approche n&#233;cessite un jeton d'acc&#232;s pour autoriser la demande d'introspection. &lt;br class='autobr' /&gt;
Pour une application ce ne sera pas un probl&#232;me dans la mesure o&#249; la demande UserInfo suivra g&#233;n&#233;ralement une demande de jetons.&lt;br class='autobr' /&gt;
Pour un serveur de ressource, cela est plus compliqu&#233; du fait de la dur&#233;e limit&#233;e de validit&#233; du jeton d'acc&#232;s, contraignant &#224; une nouvelle demande de jeton. Une fa&#231;on d'obtenir un tel jeton consiste &#224; inscrire le serveur de ressource pour le flux &lt;a href='https://static.oa.dnc.global/-Autorisation-de-serveur-a-serveur-Client-Credentials-Grant-.html#oauth20autorisationdeserveuraserveurexemplecomplet' class='spip_in'&gt;Client Credential Grant&lt;/a&gt;. &lt;br class='autobr' /&gt;
L'authentification est effectu&#233;e en passant le jeton dans l'en-t&#234;te Authorization de la demande d'introspection.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Forme de la demande UserInfo&lt;/h3&gt;
&lt;p&gt;La m&#233;thode de transmission recommand&#233;e pour la transmission du jeton d'acc&#232;s &#224; UserInfo est HTTP Auth Header :&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt; GET /userinfo HTTP/1.1&lt;br /&gt; Host: oa.dnc.global/userinfo&lt;br /&gt; Authorization: Bearer SlrqTTP7i88GkKGQWDbPs9RWVAnWHz5e7nxAV32hH&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Exemples :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// M&#233;thode Auth Header&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'https://oa.dnc.global/userinfo'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Authorization: Bearer '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$access_token&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_exec&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_exec&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;!&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/exit&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&#034;http://www.php.net/curl_error&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_error&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_close&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_close&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/json_decode&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;json_decode&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;echo&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;UserInfo Response:&lt;span style=&#034;color: #000099; font-weight: bold;&#034;&gt;\n&lt;/span&gt;&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/print_r&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;print_r&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$res&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/2d9b430e0fda4a5dcd9f0746902d1d8f.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;SPIP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$url&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;&#034;https://oa.dnc.global/userinfo&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$options&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'methode'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'GET'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'datas'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Authorization: Bearer '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$access_token&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$resource_response&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; recuperer_url&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$url&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$options&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/828fe165d6f511eb8550f697061cd7c4.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Mais on peut &#233;galement transmettre le jeton d'acc&#232;s avec la m&#233;thode POST. Notez dans l'exemple suivant que le jeton d'acc&#232;s est fourni sans l'indication 'Bearer' :&lt;br class='autobr' /&gt;
&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_php code&#034;&gt;&lt;div class=&#034;php&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// M&#233;thode Post&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$data2&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'access_token'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$access_token&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/curl_init&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_init&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$userinfo_endpoint&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_RETURNTRANSFER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_TIMEOUT&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;10&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POST&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #009900; font-weight: bold;&#034;&gt;true&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_HTTPHEADER&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'Content-Type: application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;// semble facultatif : curl le fait pour nous?&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;a href=&#034;http://www.php.net/curl_setopt&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;curl_setopt&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$h&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; CURLOPT_POSTFIELDS&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/http_build_query&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;http_build_query&lt;/span&gt;&lt;/a&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$data2&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #666666; font-style: italic;&#034;&gt;//*/&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://static.oa.dnc.global/local/cache-code/272c96f523c0229aede73a6137207952.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;R&#233;ponse du serveur&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;En cas de succ&#232;s&lt;/strong&gt;, le serveur retourne une r&#233;ponse HTTP 200.&lt;/p&gt;
&lt;p&gt;Le corps de la r&#233;ponse contient un tableau portant les informations suivantes :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='idb613_c0'&gt; index &lt;/th&gt;&lt;th id='idb613_c1'&gt; type &lt;/th&gt;&lt;th id='idb613_c2'&gt; valeur &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='idb613_c0'&gt;status&lt;/td&gt;
&lt;td headers='idb613_c1'&gt;entier&lt;/td&gt;
&lt;td headers='idb613_c2'&gt;code HTTP&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td headers='idb613_c0'&gt;headers&lt;/td&gt;
&lt;td headers='idb613_c1'&gt;string&lt;/td&gt;
&lt;td headers='idb613_c2'&gt;Headers de la r&#233;ponse&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='idb613_c0'&gt;page&lt;/td&gt;
&lt;td headers='idb613_c1'&gt;string&lt;/td&gt;
&lt;td headers='idb613_c2'&gt;JSON Array :&lt;br class='autobr' /&gt;
La r&#233;ponse est d&#233;taill&#233;e ici : &lt;a href='https://static.oa.dnc.global/-Sujets-communs-a-Oauth-2-et-OpenID-Connect-.html#reponseuserinfo' class='spip_in'&gt;R&#233;ponse UserInfo&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Note :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; La valeur (string) &#034;null&#034; est forc&#233;e pour tous les champs vides ou NULL.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; La sp&#233;cification indique qu'il n'est pas garanti que la r&#233;ponse UserInfo corresponde &#224; l'utilisateur identifi&#233; par l'&#233;l&#233;ment user_id du ID Token ID. Avant de consid&#233;rer la r&#233;ponse UserInfo comme valide, il convient de v&#233;rifier que la revendication user_id dans la r&#233;ponse UserInfo Endpoint correspond exactement &#224; la revendication user_id dans le Token ID.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Par ailleurs, la sp&#233;cification impose de v&#233;rifier un ID Token d&#232;s sa r&#233;ception. Ceci veut dire que &lt;strong&gt;toute requ&#234;te Userinfo devrait suivre le cycle : demande d'autorisation, validation du jeton ID Token, demande Userinfo, v&#233;rification de la concordance des user_id&lt;/strong&gt;. C'est ce qui est d&#233;crit dans les &lt;a href='https://static.oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#openidconnectexemplescompletsdufluxdautorisationviauncodepuisrequeteuserinfo' class='spip_in'&gt;exemples&lt;/a&gt;.
&lt;br /&gt;&lt;img src='https://static.oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Si la constante de configuration CHECK_CLIENT_IP est r&#233;gl&#233;e &#224; 'true' (ce qui est fortement conseill&#233;), et que la valeur de l'IP a &#233;t&#233; fournie lors de l'enregistrement de l'application cliente (ce qui est &#233;galement conseill&#233;), le contr&#244;leur UserInfo v&#233;rifiera que l'IP de l'origine de la requ&#234;te est conforme. Cela interdit &#224; une application &#233;trang&#232;re d'utiliser un jeton d'acc&#232;s vol&#233;.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;En cas d'&#233;chec&lt;/strong&gt;, le corps de la r&#233;ponse contient :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='idd15d_c0'&gt; index &lt;/th&gt;&lt;th id='idd15d_c1'&gt; type &lt;/th&gt;&lt;th id='idd15d_c2'&gt; valeur &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td headers='idd15d_c0'&gt;page&lt;/td&gt;
&lt;td headers='idd15d_c1'&gt;string&lt;/td&gt;
&lt;td headers='idd15d_c2'&gt;JSON Array :&lt;br class='autobr' /&gt;
error : (string) titre de l'erreur,&lt;br class='autobr' /&gt;
error_description : (string) description de l'erreur&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;La r&#233;ponse HTTP ainsi que les valeurs de error et error_description sont donn&#233;es par le tableau suivant :&lt;/p&gt;
&lt;table class=&#034;spip&#034;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='id658e_c0'&gt; R&#233;ponse &lt;/th&gt;&lt;th id='id658e_c1'&gt; error
titre de l'erreur &lt;/th&gt;&lt;th id='id658e_c2'&gt; error_description
description de l'erreur &lt;/th&gt;&lt;th id='id658e_c3'&gt; Explication &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;400&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;invalid_request&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;Only one method may be used to authenticate at a time (Auth header, GET or POST)&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;N'utiliser qu'une seule m&#233;thode d'authentification &#224; la fois.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;400&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;invalid_request&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;Malformed auth header&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;La requ&#234;te de type Auth header est mal form&#233;e&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;400&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;invalid_request&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;When putting the token in the body, the method must be POST or PUT&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;Si on place le token dans le corps de la requ&#234;te, la m&#233;thode ne peut &#234;tre que POST ou PUT&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;400&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;invalid_request&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;The content type for POST requests must be &#034;application/x-www-form-urlencoded&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;l'IETF sp&#233;cifie ce type de contenu. NB : tous les serveurs Web ne remplissent pas cette variable _SERVER voir &lt;a href=&#034;http://tools.ietf.org/html/rfc6750#section-2.2&#034; class='spip_url spip_out auto' rel='nofollow external'&gt;http://tools.ietf.org/html/rfc6750#section-2.2&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;401&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;(vide)&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;(vide)&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;La requ&#234;te ne comporte aucune authentification&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;401&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;invalid_token&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;The access token provided is invalid&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;Le jeton ne figure pas dans le tokenStorage du serveur. Tr&#232;s probablement une tentative de violation d'acc&#232;s.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;401&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;expired_token&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;The access token provided has expired&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;Le jeton a expir&#233;. L'application doit obtenir un nouveau jeton et relancer la requ&#234;te&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;401&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;malformed_token&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;Malformed token (missing &#034;expires&#034;&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;401&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;malformed_token&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;Malformed token (missing &#034;client_id&#034;)&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even even'&gt;
&lt;td class='numeric ' headers='id658e_c0'&gt;403&lt;/td&gt;
&lt;td headers='id658e_c1'&gt;insufficient_scope&lt;/td&gt;
&lt;td headers='id658e_c2'&gt;The request requires higher privileges than provided by the access token&lt;/td&gt;
&lt;td headers='id658e_c3'&gt;L'application cliente n'a pas &#233;t&#233; inscrite avec le scope openid&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>
