<?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://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>Gestion de la session OIDC : Fonctionnalit&#233;s</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#gestiondelasessionoidcfonctionnalites</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#gestiondelasessionoidcfonctionnalites</guid>
		<dc:date>2024-04-28T10:33:30Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;SSO, SLI, SLO, SRA : ces fonctionnalit&#233;s offertes par OAuthSD simplifient la gestion des sessions et des connexions pour les utilisateurs, en garantissant une exp&#233;rience fluide et s&#233;curis&#233;e lors de l'utilisation d'applications multiples compatibles avec OpenID Connect. &lt;br class='autobr' /&gt;
Avant de d&#233;tailler comment OAuthSD met en &#339;uvre ces fonctionnalit&#233;s, assurons-nous de bien les distinguer : &lt;br class='autobr' /&gt; SSO (Single Sign-On) : Il s'agit d'un m&#233;canisme qui permet &#224; un utilisateur de se connecter une seule fois pour acc&#233;der &#224; (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;SSO, SLI, SLO, SRA : ces fonctionnalit&#233;s offertes par OAuthSD simplifient la gestion des sessions et des connexions pour les utilisateurs, en garantissant une exp&#233;rience fluide et s&#233;curis&#233;e lors de l'utilisation d'applications multiples compatibles avec OpenID Connect.&lt;/p&gt;
&lt;p&gt;Avant de d&#233;tailler comment OAuthSD met en &#339;uvre ces fonctionnalit&#233;s, assurons-nous de bien les distinguer :&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;strong&gt;SSO (Single Sign-On)&lt;/strong&gt; : Il s'agit d'un m&#233;canisme qui permet &#224; un utilisateur de se connecter une seule fois pour acc&#233;der &#224; plusieurs applications, sans avoir &#224; se reconnecter &#224; chaque fois. Avec OAuthSD, le SSO est mis en place pour offrir une authentification unique pour un groupe d'applications, &#233;vitant ainsi &#224; un m&#234;me internaute de devoir s'authentifier plusieurs fois pour acc&#233;der &#224; des applications diff&#233;rentes.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;SLI (Single Login In) &lt;/strong&gt; : Le SLI est un concept similaire au SSO, mais il se concentre sur le fait qu'une fois connect&#233;, un utilisateur peut acc&#233;der &#224; plusieurs applications sans avoir &#224; se reconnecter. OAuthSD utilise le SLI pour faciliter la navigation et l'&#233;change de donn&#233;es au sein d'une application multiple.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;SLO (Single Log-Out) &lt;/strong&gt; : Le SLO est le pendant du SSO, mais pour la d&#233;connexion. Il permet &#224; un utilisateur de se d&#233;connecter une seule fois pour se d&#233;connecter de toutes les applications auxquelles il est connect&#233;. Cela garantit une d&#233;connexion globale et renforce la s&#233;curit&#233; en cas de d&#233;part de l'utilisateur de son poste de travail.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;SRA (Single Re-Authentication) &lt;/strong&gt; : Le SRA est un m&#233;canisme qui permet &#224; un utilisateur de se r&#233;-authentifier de mani&#232;re transparente lorsqu'un cookie d'authentification n'est plus valide. Cela garantit une s&#233;curit&#233; renforc&#233;e en cas de besoin de r&#233;-authentification.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Cet article a &#233;t&#233; &#233;crit &#224; l'aide de &lt;a href=&#034;https://chat.i-tego.com&#034; class='spip_out' rel='external'&gt;i-Tego ChatBot&lt;/a&gt;, en r&#233;ponse &#224; la question : &#034;Dans le contexte d'OAuthSD, expliquer SSO, SLI, SLO, SRA.&#034;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>M&#233;thodes alternatives pour le monitoring de la session OpenID Conect et le SLO</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#methodesalternativespourlemonitoringdelasessionopenidconectetleslo</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#methodesalternativespourlemonitoringdelasessionopenidconectetleslo</guid>
		<dc:date>2021-01-29T10:30:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Pour synchroniser l'&#233;tat de connexion de chaque application utilis&#233;e par un m&#234;me utilisateur, nous avons utilis&#233; un code javascript pour interroger r&#233;guli&#232;rement le serveur d'authentification. &lt;br class='autobr' /&gt;
S'agissant de d&#233;connecter les sessions de toutes les applications de l'utilisateur final (SLO), il existe des alternatives. &lt;br class='autobr' /&gt;
Les trois premi&#232;res alternatives font l'objet de propositions de sp&#233;cification &#233;mises en 2020. OAuthSD ne met en &#339;uvre que OpenID Connect Session Management. La troisi&#232;me solution est plus (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Pour synchroniser l'&#233;tat de connexion de chaque application utilis&#233;e par un m&#234;me utilisateur, nous avons utilis&#233; un code javascript pour interroger r&#233;guli&#232;rement le serveur d'authentification.&lt;/p&gt;
&lt;p&gt;S'agissant de d&#233;connecter les sessions de toutes les applications de l'utilisateur final (SLO), il existe des alternatives.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Les trois premi&#232;res alternatives font l'objet de propositions de sp&#233;cification &#233;mises en 2020. OAuthSD ne met en &#339;uvre que OpenID Connect Session Management.&lt;br class='autobr' /&gt;
La troisi&#232;me solution est plus ancienne et ne devrait pas l'emporter sur ces d&#233;finitions plus r&#233;centes.&lt;/p&gt;
&lt;p&gt;Quoiqu'il en soit, la &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo' class='spip_in'&gt;solution de monitoring impl&#233;ment&#233;e par OAuthSD&lt;/a&gt; fonctionne parfaitement et est extr&#234;mement simple, ne n&#233;cessitant pas de modification du serveur. Elle a l'avantage de permettre &#233;galement de signaler &#224; l'utilisateur l'approche de la fin de la session OIDC et de lui offrir de la prolonger.&lt;/p&gt;
&lt;p&gt;Nous ne sommes donc pas tr&#232;s motiv&#233;s pour appliquer l'une ou l'autre de ces m&#233;thodes.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;OpenID Connect Front-Channel Logout&lt;/h3&gt;
&lt;p&gt;Voir : &lt;a href=&#034;https://openid.net/specs/openid-connect-frontchannel-1_0.html&#034; class='spip_out' rel='external'&gt;OpenID Connect Front-Channel Logout 1.0 - draft 04&lt;/a&gt; (ao&#251;t 2020).&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;OpenID Connect Back-Channel Logout&lt;/h3&gt;
&lt;p&gt;Voir : &lt;a href=&#034;https://openid.net/specs/openid-connect-backchannel-1_0.html&#034; class='spip_out' rel='external'&gt;OpenID Connect Back-Channel Logout 1.0 - draft 06&lt;/a&gt; (ao&#251;t 2020).&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;OpenID Connect Session Management&lt;/h3&gt;
&lt;p&gt;Nous avons d&#233;crit cette m&#233;thode ici : &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement' class='spip_in'&gt;OpenID Connect Session Management&lt;/a&gt;. Son principe et sa complexit&#233; sont assez semblables aux deux pr&#233;c&#233;dentes. &lt;br class='autobr' /&gt;
&lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement' class='spip_in'&gt;OAuthSD met en &#339;uvre cette m&#233;thode&lt;/a&gt; &#224; des fins d'exp&#233;rimentation et de suivi de la norme OpenID Connect.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Solution utilis&#233;e par Drupal et Google Accounts&lt;/h3&gt;
&lt;p&gt;Voir : &lt;a href=&#034;https://www.drupal.org/project/openid_connect_sso&#034; class='spip_url spip_out auto' rel='nofollow external'&gt;https://www.drupal.org/project/openid_connect_sso&lt;/a&gt;&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;Apr&#232;s la connexion de l'utilisateur sur le serveur ou la d&#233;connexion de l'un des sites du r&#233;seau, le module d&#233;marre une cha&#238;ne de redirection qui visite le script SSO de chaque site du r&#233;seau.&lt;br class='autobr' /&gt;
Le script SSO d&#233;finit ensuite un cookie informant le site parent de la connexion/d&#233;connexion en attente.&lt;br class='autobr' /&gt;
Lorsque l'utilisateur visite le site r&#233;el, le cookie est lu et l'utilisateur se connecte/d&#233;connecte automatiquement.&lt;/p&gt;
&lt;p&gt;Cette approche est identique &#224; celle utilis&#233;e par les comptes Google.&lt;/p&gt;
&lt;p&gt;Le but des redirections est de donner &#224; chaque site la possibilit&#233; de d&#233;finir un cookie valide pour son domaine contournant ainsi la politique de m&#234;me origine qui interdit &#224; un site de d&#233;finir un cookie pour un autre domaine.&lt;/p&gt;
&lt;p&gt;Les redirections sont rapides et imperceptibles, car le script SSO est autonome ... et ne d&#233;finit que le cookie.&lt;/p&gt;
&lt;/blockquote&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;&lt;?php&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: #009933; 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: #009933; font-style: italic;&#034;&gt; * @file&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: #009933; font-style: italic;&#034;&gt; * Creates cookies for each of the network sites to signal a login/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: #009933; 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: #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;$_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;'HTTP_HOST'&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;// Some pre-HTTP/1.1 clients will not send a Host 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;// We can't work around this.&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: #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: #666666; font-style: italic;&#034;&gt;// The collection of SSO script addresses which form the redirection network.&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;// Don't include the protocol (http://, https://).&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;// Example url (SSO script on subdomain): &#034;a.firstsite.com&#034;&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;// Example url (SSO script in the Drupal directory): &#034;firstsite.com/sso.php&#034;&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;$network&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;'a.firstsite.com'&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;'a.shop.secondsite.com'&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;// An array of network domain names. The keys are potential origin host names&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;// which do not appear in the list above, and each value is the cookie domain&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;// name for that host.&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;// $domains = array();&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;// Enable HTTPS for all redirect URLs.&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;// $https = true;&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;// Enable adding the domain name to the cookie name.&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;// $cookie_name_strict = true;&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;// Validate the query parameters and network size.&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;sso_validate_query_params&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;a href=&#034;http://www.php.net/count&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;count&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;$network&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;&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;2&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;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: #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: #666666; font-style: italic;&#034;&gt;// $_SERVER['HTTP_HOST'] is lowercased here per specifications.&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;$host&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/strtolower&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strtolower&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;'HTTP_HOST'&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;/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;$origin_host&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;'origin_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;&lt;span style=&#034;color: #000088;&#034;&gt;$origin_domain&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&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;$domains&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$origin_host&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: #000088;&#034;&gt;$domains&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$origin_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;$origin_host&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;// Find the next site that needs to be visited in the $network, by removing&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;// the origin site re-keying the array.&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;foreach&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$network&lt;/span&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;as&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$delta&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$site&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/strpos&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strpos&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;$site&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$origin_domain&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: #cc66cc;&#034;&gt;0&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;||&lt;/span&gt; &lt;a href=&#034;http://www.php.net/strpos&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strpos&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;$site&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'a.'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$origin_domain&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: #cc66cc;&#034;&gt;0&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;a href=&#034;http://www.php.net/unset&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;unset&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;$network&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$delta&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: #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;span style=&#034;color: #000088;&#034;&gt;$network&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/array_values&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;array_values&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;$network&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/ltrim&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;ltrim&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;$host&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'a.'&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: #000088;&#034;&gt;$origin_domain&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;// We are on the site which has started the process.&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;// No need to create the cookie, the site already handled its login / 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: #666666; font-style: italic;&#034;&gt;// Start from the beginning of the redirect list.&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;$redirect_destination&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; sso_redirect_url&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$network&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #cc66cc;&#034;&gt;0&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: #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;$https&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: #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: #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; sso_create_cookie&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&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;'op'&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;/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;foreach&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$network&lt;/span&gt; &lt;span style=&#034;color: #b1b100;&#034;&gt;as&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$delta&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&gt;&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$site&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/strpos&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strpos&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;$site&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$host&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: #cc66cc;&#034;&gt;0&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;||&lt;/span&gt; &lt;a href=&#034;http://www.php.net/strpos&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strpos&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;$site&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'a.'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;.&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$host&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: #cc66cc;&#034;&gt;0&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;$current_site_delta&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$delta&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;break&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: #339933;&#034;&gt;!&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;$current_site_delta&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;a href=&#034;http://www.php.net/trigger_error&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;trigger_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: #0000ff;&#034;&gt;'Current site not found in network'&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;E_USER_ERROR&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: #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: #000088;&#034;&gt;$next_site_delta&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$current_site_delta&lt;/span&gt; &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: #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;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;$network&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$next_site_delta&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;// Redirect to the next network site.&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;$redirect_destination&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; sso_redirect_url&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$network&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$next_site_delta&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: #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;$https&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: #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: #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;// We are at the last network site. In these scenarios, we need to&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;// redirect to the destination, or to the original host in case of a 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: #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;$_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;'op'&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;'login'&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;$redirect_destination&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;'destination'&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;&#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: #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: #000088;&#034;&gt;$redirect_destination&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;$https&lt;/span&gt; ? &lt;span style=&#034;color: #0000ff;&#034;&gt;'https://'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'http://'&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: #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;'origin_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; &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;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: #666666; font-style: italic;&#034;&gt;// Redirect the user. We need to prevent the redirect from being cached.&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;'Cache-Control: max-age=0'&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;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;'Expires: Sun, 09 Aug 1987 22:00:00 +0100'&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;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;'Pragma: no-cache'&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;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;$redirect_destination&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;span style=&#034;color: #cc66cc;&#034;&gt;302&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: #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: #009933; 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: #009933; font-style: italic;&#034;&gt; * Validates the query parameters.&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: #009933; 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: #009933; font-style: italic;&#034;&gt; * Required parameters:&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: #009933; font-style: italic;&#034;&gt; * - op: Tells us what the current operation is: login or 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: #009933; font-style: italic;&#034;&gt; * - origin_host: Indicates which site initiated the login/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: #009933; font-style: italic;&#034;&gt; * Additional required parameter when the operation is &#034;login&#034;:&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: #009933; font-style: italic;&#034;&gt; * - destination: The url to redirect the user to after all redirects are done.&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: #009933; 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; sso_validate_query_params&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: #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/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;$_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;'op'&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;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;$_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;'origin_host'&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: #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: #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/in_array&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;in_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: #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;'op'&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;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;'login'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'logout'&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;&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;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: #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;$_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;'op'&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;'login'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;&amp;&amp;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;!&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;$_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;'destination'&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: #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;/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;/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: #009933; 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: #009933; font-style: italic;&#034;&gt; * Creates a cookie signaling the required operation.&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: #009933; 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: #009933; font-style: italic;&#034;&gt; * Removes any conflicting cookies.&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: #009933; 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: #009933; font-style: italic;&#034;&gt; * @param $operation&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: #009933; font-style: italic;&#034;&gt; * The operation to signal, login or 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: #009933; 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; sso_create_cookie&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$operation&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;$operation&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'login'&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;$remove&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Drupal.visitor.SSOLogout'&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;$create&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Drupal.visitor.SSOLogin'&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: #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: #000088;&#034;&gt;$remove&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Drupal.visitor.SSOLogin'&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;$create&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'Drupal.visitor.SSOLogout'&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;/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;$secure&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&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;$GLOBALS&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'https'&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;/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;$domain&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;a href=&#034;http://www.php.net/ltrim&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;ltrim&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/strtolower&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strtolower&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;'HTTP_HOST'&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;span style=&#034;color: #0000ff;&#034;&gt;'a.'&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: #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;$GLOBALS&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'cookie_name_strict'&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;$remove&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;span style=&#034;color: #000088;&#034;&gt;$domain&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;$create&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;span style=&#034;color: #000088;&#034;&gt;$domain&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;/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/setcookie&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;setcookie&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;$remove&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/time&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;time&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;span style=&#034;color: #cc66cc;&#034;&gt;3600&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;span style=&#034;color: #000088;&#034;&gt;$domain&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$secure&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;// The expiration should be less than the Drupal session duration.&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;// The most common Drupal `session.gc_maxlifetime` value is 200000 seconds,&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;// so we define the expiration to half a minute before that, accordingly.&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/setcookie&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;setcookie&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;$create&lt;/span&gt;&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: #339933;&#034;&gt;,&lt;/span&gt; &lt;a href=&#034;http://www.php.net/time&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;time&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;span style=&#034;color: #cc66cc;&#034;&gt;200000&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;-&lt;/span&gt; &lt;span style=&#034;color: #cc66cc;&#034;&gt;30&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;span style=&#034;color: #000088;&#034;&gt;$domain&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$secure&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;/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: #009933; 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: #009933; font-style: italic;&#034;&gt; * Returns an URL to which redirection can be issued.&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: #009933; 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: #009933; font-style: italic;&#034;&gt; * @param string $host&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: #009933; font-style: italic;&#034;&gt; * @param bool $https&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: #009933; font-style: italic;&#034;&gt; * @return string&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: #009933; 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; sso_redirect_url&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #000088;&#034;&gt;$host&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$https&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: #339933;&#034;&gt;!&lt;/span&gt;&lt;a href=&#034;http://www.php.net/strpos&#034;&gt;&lt;span style=&#034;color: #990000;&#034;&gt;strpos&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;$host&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: #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;$host&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;$https&lt;/span&gt; ? &lt;span style=&#034;color: #0000ff;&#034;&gt;'https://'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #0000ff;&#034;&gt;'http://'&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: #000088;&#034;&gt;$host&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;$args&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;'op'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&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;'op'&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: #0000ff;&#034;&gt;'origin_host'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;=&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;'origin_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; &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;$_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;'op'&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;'login'&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;$args&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #0000ff;&#034;&gt;'destination'&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;$_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;'destination'&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;&#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: #b1b100;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #000088;&#034;&gt;$host&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;$args&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://oa.dnc.global/local/cache-code/e614aa788811f423599889cf93631d2b.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Monitoring de l'&#233;tat de l'authentification et SLO</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo</guid>
		<dc:date>2020-09-07T11:00:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Le monitoring de l'&#233;tat de l'authentification a pour but de synchroniser la connexion locale d'une application avec le jeton d'acc&#232;s correspondant. &lt;br class='autobr' /&gt;
OAuthSD, suivant en cela OAuth 2.0, consid&#232;re que l'utilisateur final est connect&#233; &#224; une application tant que le jeton d'acc&#232;s associ&#233; est valide. &lt;br class='autobr' /&gt;
Il n'y a pas &#034;naturellement&#034; de relation directe entre ce jeton et l'&#233;tat de connexion local d'une application. Chaque application devra donc mettre en place un monitoring, c&#244;t&#233; client, dans le but de : surveiller (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Le monitoring de l'&#233;tat de l'authentification a pour but de synchroniser la connexion locale d'une application avec le jeton d'acc&#232;s correspondant.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;OAuthSD, suivant en cela OAuth 2.0, consid&#232;re que l'utilisateur final est connect&#233; &#224; une application tant que le jeton d'acc&#232;s associ&#233; est valide.&lt;/p&gt;
&lt;p&gt;Il n'y a pas &#034;naturellement&#034; de relation directe entre ce jeton et l'&#233;tat de connexion local d'une application. Chaque application devra donc mettre en place un monitoring, c&#244;t&#233; client, dans le but de :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; surveiller la validit&#233; du jeton d'acc&#232;s,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; r&#233;aliser la r&#233;-authentification silencieuse et la connexion automatique,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; compl&#233;ter le m&#233;canisme de d&#233;connexion unique (Single Logout, SLO) en provoquant la d&#233;connexion locale de l'application lorsque le jeton d'acc&#232;s a expir&#233;.&lt;/p&gt;
&lt;p&gt;Plusieurs solutions se pr&#233;sentent pour assurer le suivi de la session OIDC :&lt;/p&gt;
&lt;p&gt;1. La communaut&#233; se voit proposer une &#034;norme&#034; de gestion de la session OpenID Connect (voir : &lt;a href=&#034;https://openid.net/specs/openid-connect-session-1_0.html&#034; class='spip_out' rel='external'&gt;OpenID Connect Session Management&lt;/a&gt; ) qui s'appuie sur des iframes du c&#244;t&#233; du serveur et du c&#244;t&#233; de l'application.&lt;/p&gt;
&lt;p&gt;Dans sa version 30 publi&#233;e en ao&#251;t 2020, le paragraphe 5, encore pr&#233;sent dans la version 28, intitul&#233; &#034;Back-Channel Logout&#034;, disparait. &lt;br class='autobr' /&gt;
En effet, une nouvelle proposition &#034;&lt;a href=&#034;https://openid.net/specs/openid-connect-backchannel-1_0.html&#034; class='spip_out' rel='external'&gt;OpenID Connect Back-Channel Logout&lt;/a&gt;&#034; &#233;vite les dysfonctionnements pr&#233;vus au paragraphe &#034;User Agents Blocking Access to Third-Party Content&#034; :&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;Notez qu'au moment de la r&#233;daction de cet article, certains agents utilisateurs (navigateurs) commencent &#224; bloquer l'acc&#232;s au contenu tiers par d&#233;faut pour bloquer certains m&#233;canismes utilis&#233;s pour suivre l'activit&#233; de l'utilisateur final sur les sites. Plus pr&#233;cis&#233;ment, le contenu tiers bloqu&#233; est un contenu de site Web avec une origine diff&#233;rente de l'origine de la fen&#234;tre de l'agent utilisateur cibl&#233;e. Les donn&#233;es du site incluent les cookies et toutes les API de stockage Web (sessionStorage, localStorage, etc.).&lt;/p&gt;
&lt;p&gt;Cela peut emp&#234;cher la capacit&#233; des notifications de l'OP au niveau du RP d'acc&#233;der &#224; l'&#233;tat de l'agent utilisateur du RP pour mettre en &#339;uvre des actions de d&#233;connexion locale. En particulier, les cookies et les API de stockage Web peuvent ne pas &#234;tre disponibles dans le cadre OP charg&#233; dans le contexte RP. L'effet secondaire ici est que, selon le m&#233;canisme utilis&#233; (cookies ou stockage Web), les donn&#233;es n&#233;cessaires pour recalculer session_state peuvent ne pas &#234;tre disponibles. Les impl&#233;mentations bas&#233;es sur les cookies peuvent alors renvoyer des modifications pour chaque appel, ce qui entra&#238;ne des boucles infinies de r&#233;-authentifications. Par cons&#233;quent, les d&#233;ploiements de cette sp&#233;cification sont recommand&#233;s pour inclure un code d&#233;fensif pour d&#233;tecter cette situation et, si possible, informer l'utilisateur final que les d&#233;connexions RP demand&#233;es n'ont pas pu &#234;tre effectu&#233;es. Les d&#233;tails du code d&#233;fensif n&#233;cessaire d&#233;passent le cadre de cette sp&#233;cification ; il peut varier selon l'agent utilisateur et peut varier dans le temps, car la situation de pr&#233;vention du suivi de l'agent utilisateur est fluide et continue d'&#233;voluer. &#034;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;i&gt;Une proposition de sp&#233;cification qui a connu 30 modifications mais qui n'&#233;volue plus depuis ao&#251;t 2020, et qui de plus se termine sur un constat de dysfonctionnement, est morte !&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;De plus, il ne s'agit l&#224; que d'un proc&#233;d&#233; de communication entre une application et le serveur OIDC, communication qui peut &#234;tre r&#233;alis&#233;e par d'autres moyens, et notamment par interrogation r&#233;guli&#232;re du contr&#244;leur Authorize avec prompt = 'none'. Nous pensons (peut-&#234;tre &#224; tort ?) qu'une &#034;norme&#034; concernant une couche ISO de niveau protocole ne doit pas introduire &#224; ce niveau un proc&#233;d&#233; de communication particulier.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;2. Notre solution est pr&#233;sent&#233;e ici : &lt;a href='https://oa.dnc.global/-Ressources-pour-les-developpeurs-.html#implementationdumonitoringavecjavascriptexemplespourspipetwordpress' class='spip_in'&gt;Impl&#233;mentation du monitoring avec Javascript : exemples pour SPIP et WordPress&lt;/a&gt; interroge donc le contr&#244;leur Authorise avec le param&#232;tre display='none'.&lt;br class='autobr' /&gt; &lt;i&gt;Une impl&#233;mentation c&#244;t&#233; client s'appuyant sur la norme OpenID Connect telle qu'elle existe actuellement est bien pr&#233;f&#233;rable &#224; une nouvelle complication des applications clientes et permet d'&#233;viter la violation du principe d'ind&#233;pendance des couches ISO&lt;/i&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>OpenID Connect Session Management</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement</guid>
		<dc:date>2020-08-12T15:49:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Nota : il s'agit d'une version p&#233;rim&#233;e mais des serveurs sont fond&#233;s dessus (Publik par exemple). Cette proposition de sp&#233;cification r&#233;pond au besoin de conna&#238;tre l'&#233;tat r&#233;el de connexion de l'utilisateur et de g&#233;rer la d&#233;connexion unique. Dans l'&#233;tat actuel, ce document pr&#233;sente de multiples d&#233;fauts. DnC suit l'&#233;volution de cette sp&#233;cification et OAuthSD devra int&#233;grer les sp&#233;cifications qui seront finalement approuv&#233;es. &lt;br class='autobr' /&gt;
Sans attendre, le serveur OAuthSD r&#233;pond aux fonctionnalit&#233;s &#233;voqu&#233;es avec la technique (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://oa.dnc.global/local/cache-vignettes/L128xH128/arton71-cf6b7.png?1733821225' width='128' height='128' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;Nota : il s'agit d'une version p&#233;rim&#233;e mais des serveurs sont fond&#233;s dessus (Publik par exemple).&lt;br class='autobr' /&gt;
Cette proposition de sp&#233;cification r&#233;pond au besoin de conna&#238;tre l'&#233;tat r&#233;el de connexion de l'utilisateur et de g&#233;rer la d&#233;connexion unique. &lt;br class='autobr' /&gt;
Dans l'&#233;tat actuel, ce document pr&#233;sente de multiples d&#233;fauts. DnC suit l'&#233;volution de cette sp&#233;cification et OAuthSD devra int&#233;grer les sp&#233;cifications qui seront finalement approuv&#233;es.&lt;/p&gt;
&lt;p&gt;Sans attendre, le serveur OAuthSD r&#233;pond aux fonctionnalit&#233;s &#233;voqu&#233;es avec la technique de la &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#slissosloetsrasontdansunbateauoauthsd' class='spip_in'&gt;connexion unique&lt;/a&gt; et de la &lt;a href='https://oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectlogoutlogoutendpoint' class='spip_in'&gt;d&#233;connexion unique&lt;/a&gt; qui en d&#233;coule ainsi que le &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo' class='spip_in'&gt;monitoring&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Traduction du document &lt;a href=&#034;https://openid.net/specs/openid-connect-session-1_0.html&#034; class='spip_out' rel='external'&gt;OpenID Connect Session Management 1.0 - draft 28&lt;/a&gt;&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;
...&lt;/p&gt;
&lt;p&gt;Cette sp&#233;cification d&#233;finit le terme suivant :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Session&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; P&#233;riode continue pendant laquelle un utilisateur final acc&#232;de &#224; un RP (Relying Party) en s'appuyant sur l'authentification de l'utilisateur final effectu&#233;e par le fournisseur OpenID.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;2. D&#233;couverte du point de terminaison&lt;/h3&gt;
&lt;p&gt;Pour prendre en charge la gestion de session OpenID Connect, le RP doit obtenir les URL de point de terminaison associ&#233;es &#224; la gestion de session. Ces URL sont normalement obtenues via la r&#233;ponse &#224; la d&#233;couverte de l'OP, comme d&#233;crit dans OpenID Connect Discovery 1.0 [OpenID.Discovery], ou PEUVENT &#234;tre apprises via d'autres m&#233;canismes.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;2.1. M&#233;tadonn&#233;es de d&#233;couverte du fournisseur OpenID&lt;/h3&gt;
&lt;p&gt;Ces param&#232;tres de m&#233;tadonn&#233;es de fournisseur OpenID DOIVENT &#234;tre inclus dans les r&#233;ponses de d&#233;couverte du serveur lorsque la gestion de session et la d&#233;couverte sont prises en charge :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; check_session_iframe&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; CHAMPS OBLIGATOIRES. URL d'un iframe de l'OP qui prend en charge les communications entre origines crois&#233;es pour les informations d'&#233;tat de session avec le client RP, &#224; l'aide de l'API postMessage de HTML5. La page est charg&#233;e &#224; partir d'un iframe invisible incorpor&#233; dans une page du RP afin de pouvoir s'ex&#233;cuter dans le contexte de s&#233;curit&#233; de l'OP. Il accepte les requ&#234;tes postMessage en provenance de l'iframe du RP concern&#233; et utilise postMessage pour renvoyer le statut de connexion de l'utilisateur final vers l'OP.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; end_session_endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; CHAMPS OBLIGATOIRES. URL de l'OP sur laquelle un RP peut effectuer une redirection pour demander &#224; l'utilisateur final d'&#234;tre d&#233;connect&#233; de l'OP.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;3. Cr&#233;ation et mise &#224; jour de sessions&lt;/h3&gt;
&lt;p&gt;Dans OpenID Connect, la session du RP commence g&#233;n&#233;ralement lorsque le RP valide le jeton d'identification de l'utilisateur final. Reportez-vous &#224; la sp&#233;cification OpenID Connect Core 1.0 [OpenID.Core] pour savoir comment obtenir un jeton ID et le valider. Lorsque l'OP prend en charge la gestion de session, il DOIT &#233;galement renvoyer l'&#233;tat de session en tant que &lt;strong&gt;param&#232;tre suppl&#233;mentaire session_state&lt;/strong&gt; dans la r&#233;ponse d'authentification. La r&#233;ponse d'authentification OpenID Connect est sp&#233;cifi&#233;e dans la Section 3.1.2.5 d'OpenID Connect Core 1.0.&lt;/p&gt;
&lt;p&gt;Ce param&#232;tre est :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;session_state&lt;/strong&gt; &lt;br class='autobr' /&gt; Etat de session. Cha&#238;ne JSON [RFC7159] repr&#233;sentant l'&#233;tat de connexion de l'utilisateur final sur l'OP. Il NE DOIT PAS contenir le caract&#232;re espace (&#034;&#034;). Cette valeur est opaque pour le RP. Ceci est OBLIGATOIRE si la gestion de session est prise en charge.&lt;/p&gt;
&lt;p&gt;La valeur de l'&#233;tat de session est initialement calcul&#233;e sur le serveur. La m&#234;me valeur d'&#233;tat de session est &#233;galement recalcul&#233;e par l'iframe dans le navigateur du client. La g&#233;n&#233;ration de valeurs appropri&#233;es pour l'&#233;tat de session est sp&#233;cifi&#233;e dans la section 4.2 et est bas&#233;e sur un hachage cryptographique sal&#233; de l'ID client, de l'URL d'origine et de l'&#233;tat du navigateur OP. Pour l'URL d'origine, le serveur peut utiliser l'URL d'origine de la r&#233;ponse d'authentification, conform&#233;ment &#224; l'algorithme sp&#233;cifi&#233; &#224; la section 4 de la RFC 6454 [RFC6454].&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;4. Notification de changement d'&#233;tat de session&lt;/h3&gt;
&lt;p&gt;Un jeton d'identit&#233; vient g&#233;n&#233;ralement avec une date d'expiration. Le RP PEUT s'y fier pour expirer la session du RP. Cependant, il est tout &#224; fait possible que l'utilisateur final se soit d&#233;connect&#233; de l'OP avant la date d'expiration. Par cons&#233;quent, il est hautement souhaitable de pouvoir conna&#238;tre le statut de connexion de l'utilisateur final &#224; l'OP.&lt;/p&gt;
&lt;p&gt;Pour ce faire, il est possible de r&#233;p&#233;ter la demande d'authentification avec prompt = none&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb1' class='spip_note' rel='appendix' title='Cette solution a notre pr&#233;f&#233;rence, voir la note suivante.' id='nh1'&gt;1&lt;/a&gt;]&lt;/span&gt;. Cependant, cela entra&#238;ne un trafic r&#233;seau, ce qui est probl&#233;matique sur les appareils mobiles qui deviennent de plus en plus populaires. Par cons&#233;quent, une fois que la session est &#233;tablie avec la demande d'authentification et la r&#233;ponse, il est souhaitable de pouvoir v&#233;rifier l'&#233;tat de la connexion sur l'op&#233;rateur sans g&#233;n&#233;rer de trafic sur le r&#233;seau en interrogeant un OP iframe cach&#233; &#224; partir d'un RP iframe avec un postMessage &#224; origine restreinte, comme suit.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;4.1. RP iframe&lt;/h3&gt;
&lt;p&gt;Le RP charge un iframe invisible &#224; partir de lui-m&#234;me. Cette iframe DOIT conna&#238;tre l'ID de l'OP iframe, comme d&#233;crit &#224; la section 4.2, afin de pouvoir envoyer un message &#224; l'OP iframe. L'iframe RP interroge l'OP iframe avec postMessage &#224; un intervalle appropri&#233;&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2' class='spip_note' rel='appendix' title='Il est donc inexact d'affirmer, comme indiqu&#233; au paragraphe pr&#233;c&#233;dent, que la (...)' id='nh2'&gt;2&lt;/a&gt;]&lt;/span&gt; pour l'application RP. Avec chaque postMessage, il envoie l'&#233;tat de session d&#233;fini dans la section 4.2.&lt;/p&gt;
&lt;p&gt;Le postMessage de l'iframe RP fournit la concat&#233;nation suivante en tant que donn&#233;es :&lt;/p&gt;
&lt;p&gt; ID client + &#034; &#034; + &#233;tat de session&lt;/p&gt;
&lt;p&gt;Il doit &#233;galement pouvoir recevoir le postMessage de l'OP iframe. Les donn&#233;es re&#231;ues seront soit 'changed', soit 'unchanged', sauf si la syntaxe du message envoy&#233; est d&#233;termin&#233;e par le terminal op&#233;rateur comme &#233;tant malform&#233;e, auquel cas les donn&#233;es re&#231;ues seront erron&#233;es. D&#232;s r&#233;ception de la modification, le RP DOIT effectuer une nouvelle authentification avec prompt = none pour obtenir l'&#233;tat de la session en cours sur le terminal op&#233;rateur. &#192; la r&#233;ception d'une erreur, le RP NE DOIT PAS effectuer de nouvelle authentification avec prompt = none, afin de ne pas causer de boucles infinies potentielles g&#233;n&#233;rant un trafic r&#233;seau vers le terminal op&#233;rateur.&lt;/p&gt;
&lt;p&gt;Voici un exemple de pseudo-code non normatif pour l'iframe RP :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_javascript code&#034;&gt;&lt;div class=&#034;javascript&#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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; stat &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;unchanged&#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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; mes &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; client_id &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034; &#034;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; session_state&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: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; check_session&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;/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;&#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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; targetOrigin &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;https://server.example.com&#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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; win &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; window.&lt;span style=&#034;color: #660066;&#034;&gt;parent&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;document&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;getElementById&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;op&#034;&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;span style=&#034;color: #660066;&#034;&gt;contentWindow&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; win.&lt;span style=&#034;color: #660066;&#034;&gt;postMessage&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; mes&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; targetOrigin&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;/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: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; setTimer&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;/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;&#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; check_session&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;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; timerID &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; setInterval&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;check_session()&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt;&lt;span style=&#034;color: #CC0000;&#034;&gt;3&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;*&lt;/span&gt;&lt;span style=&#034;color: #CC0000;&#034;&gt;1000&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;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; window.&lt;span style=&#034;color: #660066;&#034;&gt;addEventListener&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;message&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; receiveMessage&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #003366; font-weight: bold;&#034;&gt;false&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: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; receiveMessage&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;e&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;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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; targetOrigin &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;https://server.example.com&#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: #000066; font-weight: bold;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;e.&lt;span style=&#034;color: #660066;&#034;&gt;origin&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;!==&lt;/span&gt; targetOrigin &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;span style=&#034;color: #000066; font-weight: bold;&#034;&gt;return&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&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; stat &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; e.&lt;span style=&#034;color: #660066;&#034;&gt;data&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: #000066; font-weight: bold;&#034;&gt;if&lt;/span&gt; stat &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;changed&#034;&lt;/span&gt; then take the actions below...&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://oa.dnc.global/local/cache-code/e9b36928434a4a846dd2595c5677dbcd.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&#034;spip&#034;&gt;4.2. OP iframe&lt;/h3&gt;
&lt;p&gt;Le RP charge &#233;galement un OP iframe invisible &#224; partir de check_session_iframe de l'OP. Le RP DOIT assigner un attribut id &#224; l'iframe afin qu'il puisse l'adresser, comme d&#233;crit ci-dessus. L'OP iframe DOIT imposer que l'appelant ait la m&#234;me origine que son cadre parent. Il DOIT rejeter les demandes postMessage de toute autre source.&lt;/p&gt;
&lt;p&gt;Comme sp&#233;cifi&#233; dans la section 4.1, le postMessage de l'iframe RP fournit la concat&#233;nation suivante en tant que donn&#233;es :&lt;/p&gt;
&lt;p&gt; &lt;code class='spip_code' dir='ltr'&gt;ID client + &#034; &#034; + session_state&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;L'op iframe a acc&#232;s &#224; l'&#233;tat du navigateur dans l'OP (dans un cookie ou dans un stockage HTML5) qu'il utilise pour calculer et comparer l'&#233;tat de session OP pass&#233; par le RP. L'OP iframe DOIT le recalculer &#224; partir de l'ID client pr&#233;c&#233;demment obtenu, de l'URL d'origine de la source (&#224; partir de postMessage) et de l'&#233;tat actuel du navigateur OP. L'&#233;tat de session inclut toutes ces informations pour des raisons de confidentialit&#233;, de sorte que diff&#233;rents clients actifs dans le m&#234;me navigateur ont des valeurs d'&#233;tat de session distinctes.&lt;/p&gt;
&lt;p&gt;Si le postMessage re&#231;u est syntaxiquement incorrect, de sorte que l'ID client publi&#233; et l'URL d'origine ne peuvent pas &#234;tre d&#233;termin&#233;s ou sont incorrects sur le plan syntaxique, l'OP iframe DOIT poster (postMessage) &#224; la source la cha&#238;ne d'erreur. Si la valeur re&#231;ue et la valeur calcul&#233;e ne correspondent pas, l'OP iframe DOIT poster &#224; la source la cha&#238;ne modifi&#233;e. S'il y a correspondance, alors il DOIT poster la cha&#238;ne inchang&#233;e.&lt;/p&gt;
&lt;p&gt;Voici un exemple non normatif de pseudo-code pour l'OP iframe :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_javascript code&#034;&gt;&lt;div class=&#034;javascript&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;window.&lt;span style=&#034;color: #660066;&#034;&gt;addEventListener&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;message&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; receiveMessage&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #003366; font-weight: bold;&#034;&gt;false&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: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; receiveMessage&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;e&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;span style=&#034;color: #006600; font-style: italic;&#034;&gt;// e.data has client_id and session_state&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: #006600; font-style: italic;&#034;&gt;// Validate message origin&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; client_id &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; e.&lt;span style=&#034;color: #660066;&#034;&gt;data&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;split&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#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;#91;&lt;/span&gt;&lt;span style=&#034;color: #CC0000;&#034;&gt;0&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; session_state &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; e.&lt;span style=&#034;color: #660066;&#034;&gt;data&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;split&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#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;#91;&lt;/span&gt;&lt;span style=&#034;color: #CC0000;&#034;&gt;1&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; salt &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; session_state.&lt;span style=&#034;color: #660066;&#034;&gt;split&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#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;#91;&lt;/span&gt;&lt;span style=&#034;color: #CC0000;&#034;&gt;1&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;/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: #006600; font-style: italic;&#034;&gt;// if message syntactically invalid&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: #006600; font-style: italic;&#034;&gt;// postMessage('error', e.origin) and return&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: #006600; font-style: italic;&#034;&gt;// get_op_browser_state() is an OP defined function&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: #006600; font-style: italic;&#034;&gt;// that returns the browser's login status at the OP.&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: #006600; font-style: italic;&#034;&gt;// How it is done is entirely up to the OP.&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; opbs &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; get_op_browser_state&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;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: #006600; font-style: italic;&#034;&gt;// Here, the session_state is calculated in this particular way,&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: #006600; font-style: italic;&#034;&gt;// but it is entirely up to the OP how to do it under the&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: #006600; font-style: italic;&#034;&gt;// requirements defined in this specification.&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; ss &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; CryptoJS.&lt;span style=&#034;color: #660066;&#034;&gt;SHA256&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;client_id &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;' '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; e.&lt;span style=&#034;color: #660066;&#034;&gt;origin&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;' '&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; opbs &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;' '&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; salt&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: #3366CC;&#034;&gt;&#034;.&#034;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; salt&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; stat &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;''&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: #000066; font-weight: bold;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;session_state &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; ss&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; stat &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;'unchanged'&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: #000066; font-weight: bold;&#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; stat &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;'changed'&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;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; e.&lt;span style=&#034;color: #660066;&#034;&gt;source&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;postMessage&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;stat&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; e.&lt;span style=&#034;color: #660066;&#034;&gt;origin&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: #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://oa.dnc.global/local/cache-code/2b3cdcf7363ee7ecd93a0ccb30c9f38e.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;L'&#233;tat du navigateur OP sera g&#233;n&#233;ralement stock&#233; dans un cookie ou dans un stockage local HTML5. Il a pour origine le serveur d'autorisations. Il capture des &#233;v&#233;nements significatifs tels que les connexions, les d&#233;connexions, le changement d'utilisateur, le changement de statut d'authentification pour les clients utilis&#233;s par l'utilisateur final, etc. Ainsi, l'OP DEVRAIT mettre &#224; jour la valeur de l'&#233;tat du navigateur en r&#233;ponse &#224; de tels &#233;v&#233;nements significatifs. En cons&#233;quence, le prochain appel &#224; check_session () apr&#232;s un tel &#233;v&#233;nement renverra la valeur modifi&#233;e. Il est RECOMMAND&#201; que le terminal op&#233;rateur ne mette pas &#224; jour l'&#233;tat du navigateur trop fr&#233;quemment en l'absence d'&#233;v&#233;nements significatifs, afin d'&#233;viter un trafic r&#233;seau excessif sur le client en r&#233;ponse &#224; des &#233;v&#233;nements erron&#233;s.&lt;/p&gt;
&lt;p&gt;Le calcul de l'&#233;tat de session renvoy&#233; en r&#233;ponse &#224; des demandes d'authentification infructueuses DEVRAIT, en plus de l'&#233;tat du navigateur, incorporer suffisamment d'al&#233;a sous la forme d'un sel afin d'emp&#234;cher l'identification d'un utilisateur final lors d'appels successifs au point de terminaison d'autorisation de l'OP.&lt;/p&gt;
&lt;p&gt;Dans le cas d'un client autoris&#233; (r&#233;ponse d'authentification r&#233;ussie), l'OP DEVRAIT changer la valeur de l'&#233;tat de session renvoy&#233; au client &#224; l'occurrence de l'un des &#233;v&#233;nements suivants :&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; L'ensemble des utilisateurs authentifi&#233;s aupr&#232;s du navigateur change (connexion, d&#233;connexion, ajout de session).&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Le statut d'authentification des clients utilis&#233;s par l'utilisateur final change.&lt;/p&gt;
&lt;p&gt;De plus, l'&#233;tat du navigateur utilis&#233; pour v&#233;rifier l'&#233;tat de la session DEVRAIT changer avec de tels &#233;v&#233;nements. Les appels &#224; check_session() renverront les modifications apport&#233;es par rapport aux versions ant&#233;rieures de l'&#233;tat de session apr&#232;s de tels &#233;v&#233;nements. Il est RECOMMAND&#201; que l'&#233;tat du navigateur NE DEVRAIT PAS varier trop souvent en l'absence de tels &#233;v&#233;nements afin de minimiser le trafic sur le r&#233;seau caus&#233; par la r&#233;ponse du client aux notifications modifi&#233;es.&lt;/p&gt;
&lt;p&gt;Dans le cas d'une demande d'authentification infructueuse, la valeur de l'&#233;tat de session renvoy&#233;e DEVRAIT varier avec chaque demande. Cependant, l'&#233;tat de la session du navigateur n'a pas besoin de changer sauf si un &#233;v&#233;nement significatif se produit. En particulier, de nombreuses valeurs d'&#233;tat de session peuvent &#234;tre simultan&#233;ment valides, par exemple en introduisant un sel al&#233;atoire dans les &#233;tats de session &#233;mis en r&#233;ponse &#224; des demandes d'authentification infructueuses.&lt;/p&gt;
&lt;p&gt;Si un cookie est utilis&#233; pour conserver l'&#233;tat du navigateur OP, l'indicateur HttpOnly ne peut probablement pas &#234;tre d&#233;fini pour ce cookie car il doit &#234;tre accessible &#224; partir de JavaScript. Par cons&#233;quent, les informations pouvant &#234;tre utilis&#233;es pour identifier l'utilisateur ne doivent pas &#234;tre plac&#233;es dans le cookie, car elles pourraient &#234;tre lues par du JavaScript non associ&#233;.&lt;/p&gt;
&lt;p&gt;Dans certaines impl&#233;mentations, les notifications modifi&#233;es ne se produiront que lorsque la session de l'utilisateur final sera modifi&#233;e, alors que dans d'autres impl&#233;mentations, elles pourront &#233;galement survenir &#224; la suite de modifications apport&#233;es &#224; d'autres sessions entre l'agent d'utilisateur et le terminal op&#233;rateur. Les PR doivent &#234;tre pr&#233;par&#233;s &#224; toute &#233;ventualit&#233;, en g&#233;rant en silence tous les faux positifs susceptibles de se produire.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;5. D&#233;connexion initi&#233;e par le RP&lt;/h3&gt;
&lt;p&gt;Un RP peut notifier &#224; l'OP que l'utilisateur final s'est d&#233;connect&#233; du site et peut &#233;galement vouloir se d&#233;connecter de l'OP. Dans ce cas, le RP, apr&#232;s avoir d&#233;connect&#233; l'utilisateur final du RP, redirige l'agent utilisateur de l'utilisateur final vers l'URL du point de terminaison de d&#233;connexion de l'OP. Cette URL est normalement obtenue via l'&#233;l&#233;ment end_session_endpoint de la r&#233;ponse &#224; la d&#233;couverte de l'OP ou peut &#234;tre apprise via d'autres m&#233;canismes.&lt;/p&gt;
&lt;p&gt;Cette sp&#233;cification d&#233;finit &#233;galement les param&#232;tres suivants qui sont transmis en tant que param&#232;tres de requ&#234;te dans la demande de d&#233;connexion :&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;id_token_hint&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; CONSEILL&#201;&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3' class='spip_note' rel='appendix' title='Obligatoire pour OAuthSD' id='nh3'&gt;3&lt;/a&gt;]&lt;/span&gt;. Le jeton d'ID pr&#233;c&#233;demment &#233;mis a &#233;t&#233; transmis au point de terminaison de la d&#233;connexion en tant qu'indication de la session authentifi&#233;e actuelle de l'utilisateur final avec le client. Ceci est utilis&#233; comme indication de l'identit&#233; de l'utilisateur final que le RP demande &#224; &#234;tre d&#233;connect&#233; par l'OP. L'OP n'a pas besoin d'&#234;tre r&#233;pertori&#233; en tant que public du jeton ID lorsqu'il est utilis&#233; en tant que valeur id_token_hint.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;post_logout_redirect_uri&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; OPTIONNEL. URL &#224; laquelle le RP demande que l'agent utilisateur de l'utilisateur final soit redirig&#233; apr&#232;s la d&#233;connexion. La valeur DOIT avoir d&#233;j&#224; &#233;t&#233; enregistr&#233;e aupr&#232;s de l'OP, soit &#224; l'aide du param&#232;tre d'enregistrement post_logout_redirect_uris, soit via un autre m&#233;canisme. S'il est fourni, l'OP DEVRAIT honorer cette demande apr&#232;s la d&#233;connexion.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;state&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; OPTIONNEL. Valeur opaque utilis&#233;e par le RP pour maintenir l'&#233;tat entre la demande de d&#233;connexion et le rappel au noeud final sp&#233;cifi&#233; par le param&#232;tre de requ&#234;te post_logout_redirect_uri. S'il est inclus dans la demande de d&#233;connexion, l'OP retransmet cette valeur au RP en utilisant le param&#232;tre de requ&#234;te d'&#233;tat lors de la redirection de l'agent d'utilisateur vers le RP.&lt;/p&gt;
&lt;p&gt;Au point de terminaison de la d&#233;connexion, l'OP DEVRAIT demander &#224; l'utilisateur final s'il souhaite &#233;galement se d&#233;connecter de l'OP. Si l'utilisateur final dit &#034;oui&#034;, alors l'OP DOIT d&#233;connecter l'utilisateur final.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;5.1. Redirection vers RP apr&#232;s la d&#233;connexion&lt;/h3&gt;
&lt;p&gt;Dans certains cas, le RP demande &#224; ce que l'agent d'utilisateur de l'utilisateur final soit redirig&#233; vers le RP apr&#232;s la d&#233;connexion. La redirection post-d&#233;connexion n'est effectu&#233;e que lorsque la d&#233;connexion est lanc&#233;e par le RP, auquel cas la cible de la redirection est la valeur du param&#232;tre de requ&#234;te post_logout_redirect_uri utilis&#233;e par le RP initiateur ; sinon ce n'est pas fait. Cette sp&#233;cification d&#233;finit ce param&#232;tre d'enregistrement dynamique &#224; cette fin, conform&#233;ment &#224; la section 2.1 d'OpenID Connect Dynamic Client Registration 1.0 [OpenID.Registration].&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;5.1.1. M&#233;tadonn&#233;es d'inscription du client&lt;/h3&gt;
&lt;p&gt;Ce param&#232;tre de m&#233;tadonn&#233;es client PEUT &#234;tre inclus dans les informations d'enregistrement du client lorsque la gestion de session et l'enregistrement dynamique sont pris en charge :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;post_logout_redirect_uris&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; OPTIONNEL. Tableau d'URL fournies par le RP auquel il PEUT demander que l'agent d'utilisateur de l'utilisateur final soit redirig&#233; &#224; l'aide du param&#232;tre post_logout_redirect_uri apr&#232;s la d&#233;connexion&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb4' class='spip_note' rel='appendix' title='Nous consid&#233;rons cette fonctionnalit&#233; comme tr&#232;s dangereuse, car elle permet &#224; (...)' id='nh4'&gt;4&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;6. Validation&lt;/h3&gt;
&lt;p&gt;Si l'une des proc&#233;dures de validation d&#233;finies dans la pr&#233;sente sp&#233;cification &#233;choue, les op&#233;rations n&#233;cessitant des informations qui n'ont pas &#233;t&#233; correctement valid&#233;es DOIVENT &#234;tre annul&#233;es et les informations qui n'ont pas &#233;t&#233; valid&#233;es NE DOIVENT PAS &#234;tre utilis&#233;es.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;7. Consid&#233;rations de mise en &#339;uvre&lt;/h3&gt;
&lt;p&gt;Cette sp&#233;cification d&#233;finit les fonctionnalit&#233;s utilis&#233;es par les parties utilisatrices et les fournisseurs OpenID ayant choisi d'impl&#233;menter la gestion de session. Toutes ces parties utilisatrices et fournisseurs OpenID DOIVENT impl&#233;menter les fonctions list&#233;es dans cette sp&#233;cification comme &#233;tant &#034;REQUIRED&#034; ou d&#233;crites avec un &#034;MUST&#034;. Aucune autre consid&#233;ration d'impl&#233;mentation pour les impl&#233;mentations de Session Management n'est d&#233;finie par cette sp&#233;cification.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;8. Consid&#233;rations de s&#233;curit&#233;&lt;/h3&gt;
&lt;p&gt;L'OP iframe DOIT imposer que l'appelant ait la m&#234;me origine que son cadre parent. Il DOIT rejeter les demandes postMessage provenant de toute autre source, afin d'emp&#234;cher les attaques de script entre sites.&lt;/p&gt;
&lt;p&gt;Le param&#232;tre id_token_hint associ&#233; &#224; une demande de d&#233;connexion peut &#234;tre utilis&#233; pour d&#233;terminer quel RP a lanc&#233; la demande de d&#233;connexion. Les demandes de d&#233;connexion sans valeur id_token_hint valide constituent un moyen de d&#233;ni de service potentiel ; par cons&#233;quent, les op&#233;rateurs peuvent vouloir demander une confirmation explicite de l'utilisateur avant d'agir.&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;/blockquote&gt;&lt;h3 class=&#034;spip&#034;&gt;Critique raisonn&#233;e de la m&#233;thode et solution pour OAuthSD&lt;/h3&gt;
&lt;p&gt;Rappelons tout d'abord que la m&#233;thode des iframes n'est pas celle que pr&#233;conise OAuthSD, voyez : &lt;a href='https://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; et &lt;a href='https://oa.dnc.global/-Ressources-pour-les-developpeurs-.html#implementationdumonitoringavecjavascriptexemplespourspipetwordpress' class='spip_in'&gt;Impl&#233;mentation du monitoring avec Javascript : exemples pour SPIP et WordPress&lt;/a&gt;. OAuthSD met en &#339;uvre la m&#233;thode pr&#233;sent&#233;e pr&#233;c&#233;demment &#224; des fins d'exp&#233;rimentation et de suivi de la norme OpenID Connect.&lt;/p&gt;
&lt;p&gt;Cependant, ce document pr&#233;sente des erreurs de principe conduisant &#224; des complications inutiles, r&#233;sultant en une m&#233;thode de monitoring inefficace. En particulier, de tr&#232;s nombreux &#233;v&#233;nements hors sujet n&#233;cessitent d'interroger l'OP sur la r&#233;alit&#233; de la connexion, ce qui entra&#238;ne un trafic important.&lt;/p&gt;
&lt;p&gt;De toutes fa&#231;ons, les erreurs, omissions et impr&#233;cisions de ce document conduisent &#224; un non fonctionnement du syst&#232;me tel que d&#233;crit.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;1. Se concentrer sur notre sujet : un utilisateur et une application donn&#233;e&lt;/h3&gt;
&lt;p&gt;&lt;i&gt;&#034;L'&#233;tat du navigateur ... capture des &#233;v&#233;nements significatifs tels que les connexions, les d&#233;connexions, le changement d'utilisateur, le changement de statut d'authentification pour les clients utilis&#233;s par l'utilisateur final, etc. Ainsi, l'OP DEVRAIT mettre &#224; jour la valeur de l'&#233;tat du navigateur en r&#233;ponse &#224; de tels &#233;v&#233;nements significatifs.&#034;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Dans cette phrase, l'expression &lt;i&gt;&#034;les connexions, les d&#233;connexions, le changement d'utilisateur, le changement de statut d'authentification pour les clients utilis&#233;s par l'utilisateur final, etc.&#034;&lt;/i&gt; est un galimatias redondant, encore embrouill&#233; par &lt;i&gt;&#034;des &#233;v&#233;nements tels que&#034;&lt;/i&gt; (il y aurait encore d'autres &#233;v&#233;nements &#224; prendre en compte ?) et par le &lt;i&gt;&#034;etc.&#034;&lt;/i&gt; final. Le texte qui suit &lt;i&gt;&#034;Dans le cas d'un client autoris&#233; (r&#233;ponse d'authentification r&#233;ussie), l'OP DEVRAIT changer la valeur de l'&#233;tat de session renvoy&#233; au client &#224; l'occurrence de l'un des &#233;v&#233;nements suivants : - L'ensemble des utilisateurs authentifi&#233;s aupr&#232;s du navigateur change (connexion, d&#233;connexion, ajout de session). - Le statut d'authentification des clients utilis&#233;s par l'utilisateur final change.&#034;&lt;/i&gt; n'est qu'une redite du pr&#233;c&#233;dent. Passons sur le fait que l'authentification n'est pas relative au client mais &#224; l'utilisateur final : on n'est pas &#224; une approximation pr&#232;s.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&#034;De plus, l'&#233;tat du navigateur utilis&#233; pour v&#233;rifier l'&#233;tat de la session DEVRAIT changer avec de tels &#233;v&#233;nements.&#034;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&#034;Il est RECOMMAND&#201; que l'&#233;tat du navigateur NE DEVRAIT PAS varier trop souvent en l'absence de tels &#233;v&#233;nements afin de minimiser le trafic sur le r&#233;seau caus&#233; par la r&#233;ponse du client aux modifications notifi&#233;es&#034;&lt;/i&gt;. C'est une absurdit&#233; : s'il n'y a pas d'&#233;v&#233;nement, il n'y a pas de notification de changement.&lt;/p&gt;
&lt;p&gt;Il appara&#238;t que les changements d'&#233;tats relatifs &#224; toutes les applications et tous les utilisateurs donnent lieu &#224; notification d'un changement d'&#233;tat.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;La seule chose qui nous int&#233;resse est de savoir si l'utilisateur de l'application ouverte sur le navigateur consid&#233;r&#233; est connect&#233; ou non.&lt;/strong&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;2. Obtenir directement l'&#233;tat de connexion, et non l'indication d'un changement&lt;/h3&gt;
&lt;p&gt;&lt;i&gt;&#034;Les appels &#224; check_session() renverront les modifications apport&#233;es par rapport aux versions ant&#233;rieures de l'&#233;tat de session apr&#232;s de tels &#233;v&#233;nements.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;D&#232;s r&#233;ception de la modification, le RP DOIT effectuer une nouvelle authentification avec prompt = none pour obtenir l'&#233;tat de la session en cours sur le terminal op&#233;rateur.&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;L'id&#233;e est de notifier un changement d'&#233;tat, et de r&#233;interroger le serveur pour savoir si l'utilisateur est toujours vu connect&#233;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution OAuthSD :&lt;/strong&gt; L'&#233;tat de connexion est relatif &#224; une application et &#224; un utilisateur. Il est traduit par la validit&#233; du jeton d'acc&#232;s.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh1' class='spip_note' title='Notes 1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;Cette solution a notre pr&#233;f&#233;rence, voir la note suivante.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2' class='spip_note' title='Notes 2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;Il est donc inexact d'affirmer, comme indiqu&#233; au paragraphe pr&#233;c&#233;dent, que la connaissance de l'&#233;tat de session peut &#234;tre effectu&#233; &#034;sans g&#233;n&#233;rer de trafic sur le r&#233;seau&#034;. Pour r&#233;duire le trafic, il conviendra d'augmenter l'intervalle d'interrogation de l'OP. Chez DnC, nous pr&#233;f&#233;rons tester la connexion avec prompt = none, le serveur OAuthSD &#233;tant optimis&#233; pour r&#233;pondre tr&#232;s rapidement &#224; une requ&#234;te de type XMLHttpRequest.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb3'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3' class='spip_note' title='Notes 3' rev='appendix'&gt;3&lt;/a&gt;] &lt;/span&gt;Obligatoire pour OAuthSD&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb4'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh4' class='spip_note' title='Notes 4' rev='appendix'&gt;4&lt;/a&gt;] &lt;/span&gt;Nous consid&#233;rons cette fonctionnalit&#233; comme tr&#232;s dangereuse, car elle permet &#224; un malware de rediriger l'utilisateur final sur une page &#233;trang&#232;re &#224; l'application initiale, favorisant ainsi le physing.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Management de session OpenID Connect avec iFrames</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#managementdesessionopenidconnectaveciframes</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#managementdesessionopenidconnectaveciframes</guid>
		<dc:date>2019-11-18T15:45:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Cet article d&#233;crit l'impl&#233;mentation dans OAuthSD du monitoring au moyen d'iFrames tel que d&#233;crit ici : OpenID Connect Session Management. &lt;br class='autobr' /&gt;
Point d'extr&#233;mit&#233; de gestion de session https://oa.dnc.global/check_session &lt;br class='autobr' /&gt;
Processus Pour d&#233;terminer le statut de connexion d'un utilisateur, l'application cliente (RP) charge une iframe dont la cible src est d&#233;finie sur le point d'extr&#233;mit&#233; de la gestion de session du serveur OAuthSD (OP). &lt;br class='autobr' /&gt;
Le point de terminaison de gestion de session a acc&#232;s &#224; un cookie qui stocke (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Cet article d&#233;crit l'impl&#233;mentation dans OAuthSD du monitoring au moyen d'iFrames tel que d&#233;crit ici : &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement' class='spip_in'&gt;OpenID Connect Session Management&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Point d'extr&#233;mit&#233; de gestion de session&lt;/h3&gt;
&lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;https://oa.dnc.global/check_session&lt;/code&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Processus&lt;/h3&gt;
&lt;p&gt;Pour d&#233;terminer le statut de connexion d'un utilisateur, l'application cliente (RP) charge une iframe dont la cible src est d&#233;finie sur le point d'extr&#233;mit&#233; de la gestion de session du serveur OAuthSD (OP).&lt;/p&gt;
&lt;p&gt;Le point de terminaison de gestion de session a acc&#232;s &#224; un cookie qui stocke l'&#233;tat de connexion ou l'&#233;tat du navigateur d'un utilisateur. Ce cookie d'&#233;tat du navigateur est mis &#224; jour lorsqu'un utilisateur se d&#233;connecte de l'OP.&lt;/p&gt;
&lt;p&gt;Le RP peut ensuite utiliser un script c&#244;t&#233; client pour appeler la fonction Window.postMessage () de l'OP iframe, en envoyant l'ID client et l'&#233;tat de session actuellement connu dans le texte du message. &lt;br class='autobr' /&gt;
Si le RP re&#231;oit en retour un postMessage du bloc OP avec la valeur &#034;changed&#034;, alors le statut de connexion de l'utilisateur sur le PO a chang&#233; et le RP peut d&#233;cider de d&#233;connecter l'utilisateur ou non. &lt;br class='autobr' /&gt;
Si la valeur &#034;unchanged&#034; est renvoy&#233;e, l'utilisateur est toujours connect&#233; &#224; l'OP.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Etat OP du navigateur (OP Browser State)&lt;/h3&gt;
&lt;p&gt;Bien que l'on parle de l' &#034;&#233;tat de connexion de l'utilisateur final sur l'OP&#034;, le management de session dont il est question ici consid&#232;re en r&#233;alit&#233; l'&#233;tat de &#034;connexion du navigateur&#034; de l'utilisateur.&lt;/p&gt;
&lt;p&gt;On notera que diff&#233;rents RP lanc&#233;s sur le m&#234;me navigateur partageront la m&#234;me session de navigateur fond&#233;e sur le m&#234;me cookie opbs.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Param&#232;tre session_state&lt;/h3&gt;
&lt;p&gt;Le contr&#244;leur authorize envoie la valeur session_state dans la r&#233;ponse d'authentification, conjointement au code d'autorisation.&lt;/p&gt;
&lt;p&gt;La valeur est calcul&#233;e comme suit :&lt;/p&gt;
&lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;session_state= hash( client_id + OP Browser State + origin url )&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Ce param&#232;tre est opaque pour le RP. Il doit le stocker d'une fa&#231;on ou d'une autre, pourvu qu'il puisse en r&#233;cup&#233;rer la valeur&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Adaptation de l'application cliente&lt;/h3&gt;
&lt;p&gt;iFrame &#034;c&#244;t&#233; client&#034; : nous devons cr&#233;er une ressource Web dans l'application cliente (RP) capable de charger une iframe ayant pour id &#034;iframeOP&#034; qui cible le point de terminaison de gestion de session de l'OP. &lt;br class='autobr' /&gt;
La ressource Web doit &#233;galement avoir acc&#232;s &#224; la valeur d'&#233;tat de session renvoy&#233;e dans le &lt;strong&gt;param&#232;tre session_state&lt;/strong&gt; de la r&#233;ponse d'autorisation. La valeur d'&#233;tat de session peut avoir &#233;t&#233; stock&#233;e dans un cookie, par exemple, ou de toute autre mani&#232;re permettant au script c&#244;t&#233; client dans la ressource Web de conna&#238;tre sa valeur.&lt;/p&gt;
&lt;p&gt;Voici un exemple d'extrait de code HTML pour l'iframe &#034;c&#244;t&#233; client&#034; :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code class=&#034;html&#034;&gt; &lt;iframe id = &#034;iframeOP&#034; src =&lt;br /&gt; &#034;https://oa.dnc.global/check_session&#034; &lt;br /&gt; frameborder = &#034;0&#034; width = &#034;0&#034; height = &#034;0&#034;&gt; &lt;br /&gt; &lt;/ iframe&gt;&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Pour v&#233;rifier l'&#233;tat de connexion d'un utilisateur, il faut appeler la fonction Window.postMessage () de l'op iframe, en transmettant l'ID client et l'&#233;tat de session en tant que param&#232;tre de message au format ID client + &#034;&#034; + &#201;tat de session et nom d'h&#244;te du serveur OP comme param&#232;tre d'origine cible.&lt;/p&gt;
&lt;p&gt;Dans l'exemple de fonction JavaScript suivant, le script s'attend &#224; ce que la valeur de l'&#233;tat de session soit stock&#233;e dans un cookie nomm&#233; session_state :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_javascript code&#034;&gt;&lt;div class=&#034;javascript&#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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; targetOP &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;https://oa.dnc.global&#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: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; check_session&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: #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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; client &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;&lt;id_du_client&gt;&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;;&lt;/span&gt; &lt;span style=&#034;color: #006600; font-style: italic;&#034;&gt;// ID du client (client_id) enregistr&#233; sur le serveur&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; sessionState &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; $COOKIES&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;session_state&#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;/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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; mes &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; client &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034; &#034;&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;+&lt;/span&gt; sessionState&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; iframe &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; window.&lt;span style=&#034;color: #660066;&#034;&gt;parent&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;document&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;getElementById&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;iframeOP&#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; iframe.&lt;span style=&#034;color: #660066;&#034;&gt;contentWindow&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;postMessage&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;mes&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; targetOP&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://oa.dnc.global/local/cache-code/ddabb19e4c9d58f268db05dfb6257974.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Configurez la ressource Web pour &#233;couter les postMessages de l'OP transmettant l'&#233;tat de connexion de l'utilisateur. L'application devrait d&#233;connecter l'utilisateur ( mettre fin &#224; la session locale ) si la valeur retourn&#233;e indique la d&#233;connexion.&lt;/p&gt;
&lt;p&gt;L'exemple JavaScript suivant montre comment ajouter un &#233;couteur d'&#233;v&#233;nement &#224; la ressource Web pour &#233;couter de tels messages :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_javascript code&#034;&gt;&lt;div class=&#034;javascript&#034;&gt;&lt;ol&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; targetOP &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;https://oa.dnc.global&#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; window.&lt;span style=&#034;color: #660066;&#034;&gt;addEventListener&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;message&#034;&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; receiveMessage&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #003366; font-weight: bold;&#034;&gt;false&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: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; receiveMessage &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;e&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: #000066; font-weight: bold;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;e.&lt;span style=&#034;color: #660066;&#034;&gt;origin&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;!&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; targetOP&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: #006600; font-style: italic;&#034;&gt;// L'origine ne vient pas de l'OP; ce message doit &#234;tre rejet&#233;.&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: #000066; font-weight: bold;&#034;&gt;return&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: #000066; font-weight: bold;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;e.&lt;span style=&#034;color: #660066;&#034;&gt;data&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;===&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;connected&#034;&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: #006600; font-style: italic;&#034;&gt;// L'utilisateur est toujours connect&#233; &#224; l'OP&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: #000066; font-weight: bold;&#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: #006600; font-style: italic;&#034;&gt;// l'utilisateur s'est d&#233;connect&#233; de l'OP&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;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://oa.dnc.global/local/cache-code/eafb1cdbf622f670f79cc5c05c3a0462.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://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Le RP doit s'assurer que l'origine du postMessage correspond au nom d'h&#244;te OP attendu. Tous les messages qui ne correspondent pas doivent &#234;tre rejet&#233;s. &lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Proxy : si l'application doit passer par un proxy pour acc&#233;der &#224; OAuthSD (l'OP), la valeur qui doit &#234;tre indiqu&#233;e pour toute URL li&#233;e &#224; l'OP doit contenir l'h&#244;te et le port du proxy, et non l'h&#244;te et le port de l'OP externe.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Offline Access</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#offlineaccess</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#offlineaccess</guid>
		<dc:date>2019-06-03T08:35:40Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Dans le cadre du flux Authorization Code d'OpenID Connect, &#034;offline_access&#034; est d&#233;fini comme valeur de port&#233;e (scope) dans une demande d'autorisation. L'objectif serait de permettre &#224; une application d'effectuer des op&#233;rations au nom d'un utilisateur final alors que celui-ci est hors ligne. &lt;br class='autobr' /&gt;
Ceci m&#233;rite un &#233;claircissement. &lt;br class='autobr' /&gt;
Sp&#233;cification de la demande &#034;offline_access&#034; &lt;br class='autobr' /&gt;
Traduction du document OpenID Connect Core 1.0 incorporating errata set 1 &#167; 11 : &lt;br class='autobr' /&gt;
11. Acc&#232;s hors ligne OpenID Connect d&#233;finit la (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Dans le cadre du flux Authorization Code d'OpenID Connect, &#034;offline_access&#034; est d&#233;fini comme valeur de port&#233;e (scope) dans une demande d'autorisation. L'objectif serait de permettre &#224; une application d'effectuer des op&#233;rations au nom d'un utilisateur final alors que celui-ci est hors ligne.&lt;/p&gt;
&lt;p&gt;Ceci m&#233;rite un &#233;claircissement.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Sp&#233;cification de la demande &#034;offline_access&#034;&lt;/h3&gt;
&lt;p&gt;Traduction du document &lt;a href=&#034;https://openid.net/specs/openid-connect-core-1_0.html&#034; class='spip_out' rel='external'&gt;OpenID Connect Core 1.0 incorporating errata set 1&lt;/a&gt; &#167; 11 :&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;&lt;strong&gt;11. Acc&#232;s hors ligne&lt;/strong&gt;&lt;br class='autobr' /&gt;
OpenID Connect d&#233;finit la valeur de port&#233;e suivante pour demander un acc&#232;s hors ligne :&lt;/p&gt;
&lt;p&gt;offline_access&lt;/p&gt;
&lt;p&gt;OPTIONNEL. Cette valeur de port&#233;e demande qu'un jeton d'actualisation OAuth 2.0 soit &#233;mis et puisse &#234;tre utilis&#233; pour obtenir un jeton d'acc&#232;s qui accorde un acc&#232;s au point de terminaison UserInfo&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-1' class='spip_note' rel='appendix' title='Seulement UserInfo ? L'examen de diff&#233;rents codes et documentations montre (...)' id='nh2-1'&gt;1&lt;/a&gt;]&lt;/span&gt; de l'utilisateur final m&#234;me lorsque l'utilisateur final n'est pas pr&#233;sent (non connect&#233;).&lt;/p&gt;
&lt;p&gt;Lorsqu'un acc&#232;s hors connexion est demand&#233;, une valeur de param&#232;tre d'invite de consentement DOIT &#234;tre utilis&#233;e&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-2' class='spip_note' rel='appendix' title='Autrement dit un appel &#224; Authorize avec prompt=consent.' id='nh2-2'&gt;2&lt;/a&gt;]&lt;/span&gt;, &lt;i&gt;sauf si d'autres conditions de traitement de la demande permettant un acc&#232;s hors connexion aux ressources demand&#233;es sont en place&lt;/i&gt;. L'OP DOIT toujours obtenir l'autorisation de renvoyer un jeton d'actualisation permettant un acc&#232;s hors ligne aux ressources demand&#233;es. Un consentement de l'utilisateur pr&#233;alablement enregistr&#233; &lt;i&gt;ne suffit pas toujours&lt;/i&gt; pour accorder un acc&#232;s hors connexion&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-3' class='spip_note' rel='appendix' title='C'est assez curieux : on voit mal comment une application &#034;hors connexion&#034; (...)' id='nh2-3'&gt;3&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&#192; la r&#233;ception d'un param&#232;tre d'&#233;tendue contenant la valeur offline_access, le serveur d'autorisations :&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; DOIT s'assurer que le param&#232;tre prompt contient un consentement sauf si d'autres conditions de traitement de la demande permettant un acc&#232;s hors ligne aux ressources demand&#233;es sont en place ; sauf si l'une de ces conditions ou les deux sont remplies, il DOIT alors ignorer la demande offline_access,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; DOIT ignorer la demande offline_access sauf si le client utilise une valeur response_type qui entra&#238;nerait le renvoi d'un code d'autorisation,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; DOIT explicitement recevoir ou avoir le consentement de tous les clients lorsque le type d'application enregistr&#233; est Web,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; DEVRAIT recevoir explicitement ou avoir le consentement de tous les clients lorsque le type d'application enregistr&#233; est natif.&lt;/p&gt;
&lt;p&gt;L'utilisation des jetons d'actualisation n'est pas exclusive au cas d'utilisation offline_access. Le serveur d'autorisations PEUT accorder des jetons d'actualisation dans d'autres contextes qui ne rel&#232;vent pas de la port&#233;e de cette sp&#233;cification&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-4' class='spip_note' rel='appendix' title='La s&#233;curit&#233; requiert de contr&#244;ler l'usage du jeton d'actualisation, OAuthSD ne (...)' id='nh2-4'&gt;4&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;/blockquote&gt;&lt;h3 class=&#034;spip&#034;&gt;Cas d'usage&lt;/h3&gt;
&lt;p&gt;L'objectif est de permettre &#224; une application d'effectuer des op&#233;rations au nom d'un utilisateur final alors que celui-ci est hors ligne (le jeton d'acc&#232;s n'est plus valide).&lt;/p&gt;
&lt;p&gt;Un exemple est une sauvegarde p&#233;riodique de certaines donn&#233;es chaque nuit.&lt;/p&gt;
&lt;p&gt;Lors de la connexion, l'application cliente demandera le consentement de l'utilisateur en appelant le contr&#244;leur Authorize avec la valeur 'offline_access' dans le param&#232;tre scope.&lt;/p&gt;
&lt;p&gt;L'application devra enregistrer le jeton de rafra&#238;chissement obtenu de fa&#231;on persistante pour l'utiliser ult&#233;rieurement, m&#234;me si l'utilisateur est d&#233;connect&#233;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;OAuthSD accorde une acception g&#233;n&#233;rale au jeton d'actualisation et en assure un contr&#244;le serr&#233;&lt;/h3&gt;
&lt;p&gt;Certaines impl&#233;mentations distinguent le jeton d'actualisation obtenu avec le consentement de l'utilisateur en r&#233;ponse &#224; la demande &#034;offline_access&#034; du jeton d'actualisation &#034;ordinaire&#034; (fourni sans ce consentement). Il est alors nomm&#233; &#034;jeton hors ligne&#034;.&lt;/p&gt;
&lt;p&gt;Nous ne voyons rien de tel dans les sp&#233;cifications ni dans les tests de certification. Nous nous en tiendrons &#224; l'interpr&#233;tation de Brent Shaffer mat&#233;rialis&#233;e dans la librairie OAuth 2.0 Server PHP :&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;Les demandes OpenID Connect incluent le jeton d'actualisation (refresh token) uniquement si la port&#233;e offline_access a &#233;t&#233; demand&#233;e et accord&#233;e.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Autrement dit : dans le cadre d'OpenID Connect, le jeton d'actualisation a une port&#233;e g&#233;n&#233;rale. Qu'il soit utilis&#233; pour un sc&#233;nario &#034;hors ligne&#034; ou pour tout autre usage ne d&#233;pend que du concepteur de l'application&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb2-5' class='spip_note' rel='appendix' title='On retrouve le principe g&#233;n&#233;ral selon lequel la signification d'une port&#233;e (...)' id='nh2-5'&gt;5&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Bonnes pratiques pour la s&#233;curit&#233;&lt;/h3&gt;
&lt;p&gt;Nous sommes d'avis que permettre l'actualisation du jeton d'acc&#232;s affaiblit la s&#233;curit&#233; des flux OpenID Connect (comme toute forme de d&#233;livrance de jeton en dehors du flux d'autorisation avec code). &lt;br class='autobr' /&gt;
Si vous mettez en &#339;uvre le jeton d'actualisation, voyez les recommandations de cet article : &lt;a href='https://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;/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;Seulement UserInfo ? L'examen de diff&#233;rents codes et documentations montre qu'un jeton retourn&#233; n'a pas un usage pr&#233;d&#233;fini. Un point &#224; &#233;claircir.&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;Autrement dit un appel &#224; Authorize avec prompt=consent.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2-3'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-3' class='spip_note' title='Notes 2-3' rev='appendix'&gt;3&lt;/a&gt;] &lt;/span&gt;C'est assez curieux : on voit mal comment une application &#034;hors connexion&#034; pourrait demander le consentement de l'utilisateur sans avoir pr&#233;-enregistr&#233; ce consentement quand l'utilisateur &#233;tait connect&#233; &#224; l'application.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2-4'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-4' class='spip_note' title='Notes 2-4' rev='appendix'&gt;4&lt;/a&gt;] &lt;/span&gt;La s&#233;curit&#233; requiert de contr&#244;ler l'usage du jeton d'actualisation, OAuthSD ne fournit ce jeton que si offline_access a &#233;t&#233; demand&#233;.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2-5'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh2-5' class='spip_note' title='Notes 2-5' rev='appendix'&gt;5&lt;/a&gt;] &lt;/span&gt;On retrouve le principe g&#233;n&#233;ral selon lequel la signification d'une port&#233;e d'autorisation (scope) ne d&#233;pend que de l'usage qui en est fait par l'application.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Avertir de la fin de session OIDC et la prolonger</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#avertirdelafindesessionoidcetlaprolonger</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#avertirdelafindesessionoidcetlaprolonger</guid>
		<dc:date>2019-04-08T10:46:40Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Le monitoring de l'&#233;tat de l'authentification permet &#224; l'utilisateur final de visualiser l'&#233;tat de la session OIDC. Voici comment avertir l'utilisateur de l'imminence de la fin de session et lui permettre de la prolonger. &lt;br class='autobr' /&gt;
Le monitoring sera complet si l'utilisateur est averti de la fin imminente de la session OIDC et si il lui est propos&#233; de la prolonger. &lt;br class='autobr' /&gt;
Lorsque l'on interroge Authorize avec prompt = 'none', une particularit&#233; d'OAuthSD est de retourner dans le corps de la r&#233;ponse le temps restant (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Le &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo' class='spip_in'&gt;monitoring de l'&#233;tat de l'authentification&lt;/a&gt; permet &#224; l'utilisateur final de visualiser l'&#233;tat de la session OIDC. Voici comment avertir l'utilisateur de l'imminence de la fin de session et lui permettre de la prolonger.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Le monitoring sera complet si l'utilisateur est averti de la fin imminente de la session OIDC et si il lui est propos&#233; de la prolonger.&lt;/p&gt;
&lt;p&gt;Lorsque l'on interroge Authorize avec prompt = 'none', une particularit&#233; d'OAuthSD est de retourner dans le corps de la r&#233;ponse le temps restant avant la fin de session (variable 'timeleft', en secondes).&lt;/p&gt;
&lt;p&gt;Toujours dans l'exemple du plugin OIDC Client pour SPIP, l'avertissement est impl&#233;ment&#233; en modifiant le code de l'objet '200' pour proposer &#224; l'utilisateur de prolonger la session :&lt;/p&gt;
&lt;p&gt;&lt;span class='spip_document_59 spip_documents spip_documents_center'&gt;
&lt;img src='https://oa.dnc.global/local/cache-vignettes/L500xH173/prolonger_session-14f85.png?1733972200' width='500' height='173' alt=&#034;&#034; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;jQuery&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_javascript code&#034;&gt;&lt;div class=&#034;javascript&#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: #CC0000;&#034;&gt;200&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #000066; font-weight: bold;&#034;&gt;function&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; data&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; textStatus&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; jqXHR&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: #006600; font-style: italic;&#034;&gt;// Signaler la connexion &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;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;'#oidc'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;css&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;'background-color'&lt;/span&gt;&lt;span style=&#034;color: #339933;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;'#8f8'&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;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;'#oidc'&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: #660066;&#034;&gt;text&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;' OIDC '&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; timeleft &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; data&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #3366CC;&#034;&gt;'timeleft'&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: #000066; font-weight: bold;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; timeleft &lt;span style=&#034;color: #339933;&#034;&gt;&lt;&lt;/span&gt; &lt;span style=&#034;color: #CC0000;&#034;&gt;600&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;span style=&#034;color: #006600; font-style: italic;&#034;&gt;//[dnc28d]&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: #006600; font-style: italic;&#034;&gt;// La fin de session approche&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: #000066; font-weight: bold;&#034;&gt;var&lt;/span&gt; retVal &lt;span style=&#034;color: #339933;&#034;&gt;=&lt;/span&gt; confirm&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;&lt;?php echo _T('oidcclient:session_expire'); ?&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;span style=&#034;color: #000066; font-weight: bold;&#034;&gt;if&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&lt;/span&gt; retVal &lt;span style=&#034;color: #339933;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #003366; 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: #006600; font-style: italic;&#034;&gt;// &#233;tendre la session&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: #660066;&#034;&gt;ajax&lt;/span&gt;&lt;span style=&#034;color: #009900;&#034;&gt;&amp;#40;&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; type &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;get&#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; url &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;&lt;?php echo OIDC_AUTHORIZATION_ENDPOINT; ?&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; data &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #009900;&#034;&gt;&#123;&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;'response_type'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#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: #3366CC;&#034;&gt;'client_id'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;&#034;&lt;?php echo OIDC_CLIENT_ID; ?&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;span style=&#034;color: #3366CC;&#034;&gt;'user_id'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; login&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: #3366CC;&#034;&gt;'state'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; state&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: #3366CC;&#034;&gt;'scope'&lt;/span&gt; &lt;span style=&#034;color: #339933;&#034;&gt;:&lt;/span&gt; &lt;span style=&#034;color: #3366CC;&#034;&gt;'openid sli'&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;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;span style=&#034;color: #009900;&#034;&gt;&#125;&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://oa.dnc.global/local/cache-code/cd246fff0b5a1b675dca8968dceb7482.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Les jetons sont rafra&#238;chis en utilisant notre m&#233;canisme de SLI, et non un jeton de rafra&#238;chissement. Voyez ici pourquoi : &lt;a href='https://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; : &#167; &#034;Bonnes pratiques pour la s&#233;curit&#233;&#034;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>SRA et dur&#233;e de la session de l'utilisateur</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#sraetdureedelasessiondelutilisateur</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#sraetdureedelasessiondelutilisateur</guid>
		<dc:date>2019-04-04T17:03:22Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;La 'dur&#233;e de la session locale' est d&#233;finie par le concepteur de l'application cliente. Dans le cadre d'OAuthSD, avec les flux entrant sur le contr&#244;leur OpenID Authorize, comment d&#233;finir en rapport les dur&#233;es de vie des jetons et du cookie SLI ? &lt;br class='autobr' /&gt;
Dur&#233;e de la session locale La 'dur&#233;e de la session locale' est d&#233;finie par l'application. G&#233;n&#233;ralement, apr&#232;s authentification, une application d&#233;finit une dur&#233;e de validit&#233; de la connexion qui en r&#233;sulte, ou &#034;dur&#233;e de la session&#034;. Lorsque celle-ci a d&#233;pass&#233; sa fin (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://oa.dnc.global/local/cache-vignettes/L128xH128/arton90-d981e.png?1733821225' width='128' height='128' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;La 'dur&#233;e de la session locale' est d&#233;finie par le concepteur de l'application cliente. Dans le cadre d'OAuthSD, avec les flux entrant sur le contr&#244;leur OpenID Authorize, comment d&#233;finir en rapport les dur&#233;es de vie des jetons et du cookie SLI ?&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;Dur&#233;e de la session locale&lt;/h3&gt;
&lt;p&gt;La 'dur&#233;e de la session locale' est d&#233;finie par l'application. G&#233;n&#233;ralement, apr&#232;s authentification, une application d&#233;finit une dur&#233;e de validit&#233; de la connexion qui en r&#233;sulte, ou &#034;dur&#233;e de la session&#034;. Lorsque celle-ci a d&#233;pass&#233; sa fin de vie (&#034;la session a expir&#233;&#034;), une nouvelle authentification est demand&#233;e &#224; l'utilisateur s'il tente une nouvelle action n&#233;cessitant l'authentification.&lt;/p&gt;
&lt;p&gt;L'utilisateur per&#231;oit la dur&#233;e de la session locale en ayant la mauvaise surprise de se voir pr&#233;senter une nouvelle demande de connexion. L'objet de la r&#233;-authentification silencieuse est de prolonger la session de fa&#231;on transparente.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;R&#233;-authentification silencieuse (Silent Re-Authentication, SRA)&lt;/h3&gt;
&lt;p&gt;Avec OAuthSD, si l'application a autoris&#233; le SLI, et si la demande d'authentification est effectu&#233;e sans d&#233;finir le &lt;a href='https://oa.dnc.global/web/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#prompt'&gt;param&#232;tre prompt&lt;/a&gt;, il y a &lt;a href='https://oa.dnc.global/web/-OAuthSD-sujets-avances-.html#sra'&gt;r&#233;-authentification silencieuse (SRA)&lt;/a&gt; : plut&#244;t que pr&#233;senter un dialogue d'authentification, le contr&#244;leur OpenID Authorize :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; v&#233;rifie l'existence d'un cookie SLI valide,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; v&#233;rifie que le jeton d'acc&#232;s associ&#233; &#224; l'authentification n'a pas expir&#233; &lt;br class='autobr' /&gt;
pour r&#233;pondre imm&#233;diatement avec un nouveau code d'acc&#232;s&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3-1' class='spip_note' rel='appendix' title='Dans le cas contraire, le dialogue d'identification est pr&#233;sent&#233;, ce qui (...)' id='nh3-1'&gt;1&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;L'application cliente poursuit normalement avec une demande de jetons.&lt;/p&gt;
&lt;p&gt;Les effets de bord sont les suivants :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; le serveur rafra&#238;chit le cookie SLI dont la dur&#233;e de vie est &#233;tendue de SLI_COOKIE_LIFETIME&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3-2' class='spip_note' rel='appendix' title='Voir le fichier /oidc/includes/configure.php.' id='nh3-2'&gt;2&lt;/a&gt;]&lt;/span&gt; secondes,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; le jeton d'acc&#232;s (Access Token) est renouvel&#233; avec une dur&#233;e de vie &#233;tendue de ACCESS_TOKEN_LIFETIME secondes,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; le jeton d'identit&#233; (ID Token) est renouvel&#233; avec une dur&#233;e de vie &#233;tendue de ID_TOKEN_LIFETIME secondes.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Rapport entre les dur&#233;es de vie&lt;/h3&gt;
&lt;p&gt;Le contr&#244;leur Authorize consid&#232;re que l'utilisateur final est connect&#233; si le jeton d'acc&#232;s n'a pas expir&#233;. On en d&#233;duit une premi&#232;re r&#232;gle :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Le SRA ne peut fonctionner que si ACCESS_TOKEN_LIFETIME &gt; 'dur&#233;e de la session locale'.&lt;/p&gt;
&lt;p&gt;Si l'utilisateur n'effectue plus d'action n&#233;cessitant l'authentification (sur une des applications authentifi&#233;es avec SLI), le cookie SLI expirera SLI_COOKIE_LIFETIME apr&#232;s le dernier SRA, ce qui est un terme mal d&#233;termin&#233; pour l'utilisateur&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb3-3' class='spip_note' rel='appendix' title='Sauf &#224; ce que l'application cliente v&#233;rifie fr&#233;quemment la connexion (...)' id='nh3-3'&gt;3&lt;/a&gt;]&lt;/span&gt;. Ceci incite &#224; :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; fixer une dur&#233;e de vie du cookie SLI assez importante, typiquement plusieurs fois la 'dur&#233;e de la session locale'.&lt;/p&gt;
&lt;p&gt;Pour ce qui est de la dur&#233;e de vie du jeton d'identit&#233; (ID Token), qui joue le m&#234;me r&#244;le que le jeton d'acc&#232;s, il parait ad&#233;quat de :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; fixer la dur&#233;e de vie ID_TOKEN_LIFETIME &#233;gale &#224; celle du jeton d'acc&#232;s.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Valeurs par d&#233;faut de la configuration d'OAuthSD&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Le valeurs suivantes sont adopt&#233;es par d&#233;faut dans le fichier configure.php :&lt;br class='autobr' /&gt;
ACCESS_TOKEN_LIFETIME : 7200s&lt;br class='autobr' /&gt;
ID_TOKEN_LIFETIME : 7200s&lt;br class='autobr' /&gt;
SLI_COOKIE_LIFETIME : 7200s x 3&lt;br class='autobr' /&gt;
Une 'dur&#233;e de la session locale' de 3600s serait coh&#233;rente avec ces valeurs.&lt;/p&gt;
&lt;p&gt;Notons que le SRA sondera le contr&#244;leur Authorize au rythme de 'dur&#233;e de la session locale' tant que l'utilisateur effectue des actions n&#233;cessitant l'authentification.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Consid&#233;rations relatives &#224; la s&#233;curit&#233;&lt;/h3&gt;
&lt;p&gt;Si l'utilisateur n'effectue plus d'action n&#233;cessitant l'authentification sur une application donn&#233;e, celle-ci se d&#233;connectera localement apr&#232;s 'dur&#233;e de la session locale'. En effet, le SRA ne fonctionne que sur une demande d'authentification, elle-m&#234;me d&#233;clench&#233;e par une action de l'utilisateur apr&#232;s la fin de vie de la session locale. Pour autant, le serveur consid&#233;rera l'utilisateur comme connect&#233; tant que le jeton d'acc&#232;s n'a pas expir&#233;, et effectuera une reconnexion silencieuse &#224; la premi&#232;re action n&#233;cessitant l'authentification. &lt;i&gt;Dans ce cas, il est important de se rendre compte que la d&#233;connexion locale n'est qu'apparente&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;On pourrait donc consid&#233;rer que le SRA ne va pas dans le sens de la s&#233;curit&#233;. En effet, la limitation de dur&#233;e des sessions a pour objet de d&#233;connecter automatiquement les applications ouvertes sur un un poste de travail abandonn&#233; par son utilisateur. &lt;br class='autobr' /&gt;
Cependant, m&#234;me les dur&#233;es de session les plus courte sont rarement inf&#233;rieures &#224; 15mn. Ce temps est largement suffisant pour permettre une compromission. &lt;br class='autobr' /&gt;
Ce n'est donc pas tant le SRA qui est en cause, mais le fait d'abandonner sans surveillance une session ouverte.&lt;/p&gt;
&lt;p&gt;La seule bonne parade est de d&#233;connecter syst&#233;matiquement toutes les applications avant de quitter son poste de travail, c'est le but de la &lt;a href='https://oa.dnc.global/web/-API-OpenID-Connect-Points-d-extremite-.html#openidconnectlogout'&gt;D&#233;connexion unique (Single LogOut, SLO)&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Que faire si la dur&#233;e de session locale est mal connue ou non ma&#238;tris&#233;e ?&lt;/h3&gt;
&lt;p&gt;Il arrive que la dur&#233;e de la session locale soit variable ou extensible. C'est par exemple le cas lorsque le dialogue de connexion &#224; l'application comporte une option du genre &#034;Conserver ma connexion&#034; ou &#034;Se souvenir de moi&#034; etc. &lt;br class='autobr' /&gt;
Dans ce cas, la 'dur&#233;e de la session locale' peut &#234;tre beaucoup plus grande que la dur&#233;e de vie fix&#233;e pour les jetons et le m&#233;canisme SRA ne fonctionne pas, ou n'a pas vraiment d'objet.&lt;/p&gt;
&lt;p&gt;Si malgr&#233; tout on veut absolument faire fonctionner le SRA, y compris sur de tr&#232;s longues 'dur&#233;e de la session locale', il est toujours possible de programmer l'application cliente pour qu'elle rafra&#238;chisse syst&#233;matiquement le jeton d'acc&#232;s. Cela doit &#234;tre fait avant qu'il n'arrive &#224; p&#233;remption, sinon la d&#233;connexion unique ne fonctionnera pas pour cette application.&lt;/p&gt;
&lt;p&gt;Du point de vue de la s&#233;curit&#233;, notons que le m&#233;canisme SLI + SRA fera en sorte que toutes les applications pour lesquelles le SLI est autoris&#233;, et auxquelles l'utilisateur sera connect&#233; &#224; partir du m&#234;me poste de travail, h&#233;riteront de cette extension de la dur&#233;e de vie apparente de leur session.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb3-1'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3-1' class='spip_note' title='Notes 3-1' rev='appendix'&gt;1&lt;/a&gt;] &lt;/span&gt;Dans le cas contraire, le dialogue d'identification est pr&#233;sent&#233;, ce qui diff&#233;rencie le SRA de l'appel &#224; Authenticate avec prompt = 'none'.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb3-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3-2' class='spip_note' title='Notes 3-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;Voir le fichier /oidc/includes/configure.php.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb3-3'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh3-3' class='spip_note' title='Notes 3-3' rev='appendix'&gt;3&lt;/a&gt;] &lt;/span&gt;Sauf &#224; ce que l'application cliente v&#233;rifie fr&#233;quemment la connexion (monitoring) et signale l'approche de l'&#233;ch&#233;ance.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>SSO et connexion unique (Single Login Identification, SLI)</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#ssoetconnexionuniquesingleloginidentificationsli</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#ssoetconnexionuniquesingleloginidentificationsli</guid>
		<dc:date>2018-12-07T10:40:41Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Une fonctionnalit&#233; attendue de la d&#233;l&#233;gation d'autorisation, que l'on associe naturellement &#224; l'inscription unique (Single Sign On, SSO) est la capacit&#233; donn&#233;e &#224; l'utilisateur final de ne se connecter qu'une seule fois pour acc&#233;der &#224; diff&#233;rentes applications (Single Login Identification, SLI). &lt;br class='autobr' /&gt;
De fa&#231;on standard, les flux d'OpenID Connect ne permettent pas de r&#233;aliser directement le SLI, mais des possibilit&#233;s existent. On est l&#224; sur une technique peu divulgu&#233;e, qui n&#233;cessite des d&#233;veloppement significatifs (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://oa.dnc.global/local/cache-vignettes/L150xH150/arton72-d4786.png?1734010462' width='150' height='150' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;Une fonctionnalit&#233; attendue de la d&#233;l&#233;gation d'autorisation, que l'on associe naturellement &#224; l'inscription unique (Single Sign On, SSO) est la capacit&#233; donn&#233;e &#224; l'utilisateur final de ne se connecter qu'une seule fois pour acc&#233;der &#224; diff&#233;rentes applications (Single Login Identification, SLI).&lt;/p&gt;
&lt;p&gt;De fa&#231;on standard, les flux d'OpenID Connect ne permettent pas de r&#233;aliser directement le SLI, mais des possibilit&#233;s existent. On est l&#224; sur une technique peu divulgu&#233;e, qui n&#233;cessite des d&#233;veloppement significatifs du c&#244;t&#233; des applications.&lt;/p&gt;
&lt;p&gt;A c&#244;t&#233; de ces m&#233;thodes standard, OAuthSD offre l'option de g&#233;rer le SLI et la r&#233;-authentification silencieuse sans n&#233;cessiter de code sp&#233;cifique du c&#244;t&#233; des applications clientes. Ceci est trait&#233; dans cet article : &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#slissosloetsrasontdansunbateauoauthsd' class='spip_in'&gt;SLI, SSO, SLO et SRA sont dans un bateau : OAuthSD&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&#034;spip&#034;&gt;SSO et SLI&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Le SSO n'implique pas automatiquement le SLI&lt;/strong&gt;&lt;br class='autobr' /&gt;
Lorsque l'on &#233;voque SSO ( Single Sign On ), on englobe souvent deux fonctionnalit&#233;s :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; le fait de ne s'enregistrer (sign on&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb4-1' class='spip_note' rel='appendix' title='Curieusement, GitHub emploie l'expression &#034;sign up&#034; pour l'enregistrement.' id='nh4-1'&gt;1&lt;/a&gt;]&lt;/span&gt;) qu'une seule fois sur un serveur d'identit&#233; et de pouvoir se connecter (entrer son login et son mot de passe) sur diff&#233;rentes applications sans avoir &#224; s'enregistrer sur chacune d'elle. C'est &#224; proprement parler le SSO.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; le fait de se connecter &#224; une application ( sign in ) et de naviguer vers une autre sans avoir &#224; entrer &#224; nouveau son login et son mot de passe. Il s'agit de la Connexion Unique &lt;strong&gt;Single Connection, Single Login Identification (SLI)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Si le SSO est dans la nature m&#234;me de OAuth 2 et OpenID Connect, il n'en est pas de m&#234;me pour le SLI. En revanche, OpenID Connect offre &#034;tout ce qu'il faut&#034; pour le r&#233;aliser. Sans pour autant pr&#233;senter de flux particulier pour cela : c'est donc une fonctionalit&#233; &#224; d&#233;velopper du c&#244;t&#233; des applications (voir : &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement' class='spip_in'&gt;OpenID Connect Session Management&lt;/a&gt;), ou bien une nouvelle fonctionnalit&#233; &#224; ajouter&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb4-2' class='spip_note' rel='appendix' title='Tout en restant dans le standard, voir : OAuthSD vers la Certification (...)' id='nh4-2'&gt;2&lt;/a&gt;]&lt;/span&gt; &#224; OpenID Connect. C'est ce qu'offre OAuthSD, voir : &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#slissosloetsrasontdansunbateauoauthsd' class='spip_in'&gt;SLI, SSO, SLO et SRA sont dans un bateau : OAuthSD&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;Bien entendu, le SLI n'est possible que dans un ensemble d'applications li&#233;es &#224; un m&#234;me serveur d'identit&#233;, c'est &#224; dire dans un espace de r&#233;seau et d'applications contr&#244;l&#233; par une m&#234;me entit&#233; (corporate realm).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Applications situ&#233;es dans le m&#234;me domaine&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Dans le cas d'applications situ&#233;es dans le m&#234;me domaine (par exemple dans dif&#233;rents sous-domaines d'un domaine principal, en plus de ce domaine lui-m&#234;me), une solution simple est de partager le cookie de session entre les applications. Pour cela, le concepteur des applications enregistrera le cookie pour le domaine principal au lieu de l'enregistrer pour le sous-domaine des applications (param&#232;tres cookie_domain et cookie_path).&lt;/p&gt;
&lt;p&gt;Cependant, les scopes sont particuliers aux applications. L'application cible doit donc r&#233;-interroger le serveur d'autorisation pour obtenir un JWT qui lui soit propre.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Applications situ&#233;es dans des domaines diff&#233;rents&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Dans le cas d'applications situ&#233;es dans des domaines diff&#233;rents le probl&#232;me est un peu plus complexe. &lt;br class='autobr' /&gt;
La transmission d'autorisation est r&#233;put&#233;e sans solution s&#251;re avec les flux OpenID Connect standard. En effet, l'application cible doit obtenir la certitude de l'origine du jeton re&#231;u, et donc de l'identit&#233; de l'utilisateur final, sans pouvoir lui imposer une nouvelle demande d'identification. C'est &#224; cela que sert la demande d'authentification silencieuse.&lt;/p&gt;
&lt;p&gt;&lt;a id=&#034;SilentRA&#034;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Demande d'authentification silencieuse (Silent Re-Authentication, SRA)&lt;/h3&gt;
&lt;p&gt;Le protocole OpenID Connect prend en charge un &lt;strong&gt;param&#232;tre prompt = none&lt;/strong&gt; sur la demande d'authentification qui permet aux applications d'indiquer que le serveur d'autorisations ne doit afficher aucune interaction de l'utilisateur (telle que l'authentification, le consentement). OAuthSD renverra la r&#233;ponse demand&#233;e &#224; l'application ou renverra une erreur si l'utilisateur n'est pas d&#233;j&#224; authentifi&#233;, ou si un type de consentement ou une invite est requis avant de continuer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Erreurs et suites&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Les valeurs possibles pour ERROR_CODE sont d&#233;finies par la sp&#233;cification OpenID Connect :&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;login_required&lt;/strong&gt; : l'utilisateur n'&#233;tait pas connect&#233; &#224; OAuthSD, l'authentification silencieuse n'est pas possible.&lt;br class='autobr' /&gt;
L'utilisateur doit &#234;tre redirig&#233; vers la page de connexion OAuthSD (sans le param&#232;tre prompt ='none') afin de s'authentifier.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;consent_required&lt;/strong&gt; : l'utilisateur &#233;tait connect&#233; &#224; OAuthSD, mais l'application attend son consentement (pour lequel il faudrait afficher une invite, ce qui est exclu par prompt='none').&lt;br class='autobr' /&gt;
D'apr&#232;s la norme, l'utilisateur devrait &#234;tre redirig&#233; vers la page de connexion OAuthSD comme pr&#233;c&#233;demment.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; &lt;strong&gt;interaction_required&lt;/strong&gt; : l'utilisateur &#233;tait connect&#233; &#224; OAuthSD et a autoris&#233; l'application, mais doit &#234;tre redirig&#233; ailleurs avant que l'authentification ne puisse &#234;tre compl&#233;t&#233;e, par exemple, lors de l'utilisation d'une r&#232;gle de redirection.&lt;br class='autobr' /&gt;
D'apr&#232;s la norme, l'utilisateur devrait &#234;tre redirig&#233; vers la page de connexion OAuthSD.&lt;/p&gt;
&lt;p&gt;En cas d'&#233;chec de l'authentification, il serait donc n&#233;cessaire de pr&#233;senter un dialogue &#224; l'utilisateur final. Mais c'est pr&#233;cis&#233;ment ce que nous ne voulons pas. &lt;br class='autobr' /&gt;
Puisqu'il faut respecter la norme OIDC, il faut s'accommoder du fonctionnement du serveur et traiter les diff&#233;rents cas du c&#244;t&#233; de l'application, ou plus exactement au niveau du module d'interface (plugin) OIDC.&lt;/p&gt;
&lt;p&gt;Premi&#232;re m&#233;thode (sans ID Token, avec cookie SLI) : dans un espace contr&#244;l&#233; par une m&#234;me organisation (corporate realm), la technique du &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#slissosloetsrasontdansunbateauoauthsd' class='spip_in'&gt;cookie SLI&lt;/a&gt; offert par OAuthSD devrait &#234;tre mis en &#339;uvre pour toutes les applications clientes. Il est alors possible de v&#233;rifier la connexion de l'utilisateur aupr&#232;s du serveur puis de d&#233;cider ce qui doit &#234;tre fait en cas de non-connexion, ce qui peut conduire &#224; rester silencieux. Cette m&#233;thode est celle que nous pratiquons dans le cadre du &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo' class='spip_in'&gt;monitoring&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Deuxi&#232;me m&#233;thode (avec ID Token) : On interroge Authorize avec prompt = 'none' et id_token_hint, voir : &lt;a href='https://oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#id_token_hintreauthentificationsilencieusedusujetaveclidtoken' class='spip_in'&gt;id_token_hint : r&#233;-authentification silencieuse du sujet avec l'ID Token&lt;/a&gt;.&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;Curieusement, GitHub emploie l'expression &#034;sign up&#034; pour l'enregistrement.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb4-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh4-2' class='spip_note' title='Notes 4-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;Tout en restant dans le standard, voir : &lt;a href='https://oa.dnc.global/-Tests-et-certification-.html#oauthsdverslacertificationopenidr' class='spip_in'&gt;OAuthSD vers la Certification OpenID (r)&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>SLI, SSO, SLO et SRA sont dans un bateau : OAuthSD</title>
		<link>https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#slissosloetsrasontdansunbateauoauthsd</link>
		<guid isPermaLink="true">https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#slissosloetsrasontdansunbateauoauthsd</guid>
		<dc:date>2018-12-07T08:00:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>DnC</dc:creator>



		<description>
&lt;p&gt;Dans le cadre des flux OpenID Connect, outre la fonction d'inscription unique (Single Sign On, SSO) le serveur OAuthSD impl&#233;mente la fonction d'identification unique (Single Login Identification, SLI), la d&#233;connexion unique (Single Login Out, SLO) ainsi que la r&#233;-authentification silencieuse (Silent Re-Authentication, SRA). Ceci sans modification du code d'interface des applications avec OIDC, tout &#233;tant pris en compte au niveau du contr&#244;leur authorize. &lt;br class='autobr' /&gt;
Le code du serveur OAuthSD peut &#234;tre (...)&lt;/p&gt;


-
&lt;a href="https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html" rel="directory"&gt;OpenID Connect : SSO, management de session etc.&lt;/a&gt;


		</description>


 <content:encoded>&lt;img class='spip_logo spip_logo_right spip_logos' alt=&#034;&#034; style='float:right' src='https://oa.dnc.global/local/cache-vignettes/L128xH128/arton74-73d5d.png?1733821225' width='128' height='128' /&gt;
		&lt;div class='rss_chapo'&gt;&lt;p&gt;Dans le cadre des flux OpenID Connect, outre la fonction d'inscription unique (Single Sign On, SSO) le serveur OAuthSD impl&#233;mente la fonction d'identification unique (Single Login Identification, SLI), la d&#233;connexion unique (Single Login Out, SLO) ainsi que la r&#233;-authentification silencieuse (Silent Re-Authentication, SRA)&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb5-1' class='spip_note' rel='appendix' title='Ces fonctionnalit&#233;s sont souvent comprises comme faisant partie du SSO, mais (...)' id='nh5-1'&gt;1&lt;/a&gt;]&lt;/span&gt;. Ceci sans modification du code d'interface des applications avec OIDC, tout &#233;tant pris en compte au niveau du contr&#244;leur authorize.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Le code du serveur OAuthSD peut &#234;tre param&#233;tr&#233; pour impl&#233;menter (ou non) le SLI. La d&#233;connexion unique (SLO) et la r&#233;-authentification silencieuse (SRA) d&#233;coulent du SLI.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Identification unique (Single Login Identification, SLI)&lt;/h3&gt;
&lt;p&gt;Lorsque le SLI est autoris&#233; (ENABLE_SLI = true) ET que l'application cliente a &#233;t&#233; enregistr&#233;e sur le serveur avec le scope 'sli', le contr&#244;leur authorize traite une &lt;strong&gt;demande d'autorisation sans param&#232;tre prompt&lt;/strong&gt; comme ceci :&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; La pr&#233;sence d'un &lt;strong&gt;cookie SLI&lt;/strong&gt; enregistr&#233; sur l'agent est test&#233;e,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; si le cookie SLI est pr&#233;sent, non p&#233;rim&#233; et valid&#233;, il est utilis&#233; pour l'authentification (&lt;strong&gt;le formulaire de login n'est pas pr&#233;sent&#233; &#224; l'utilisateur&lt;/strong&gt;), le contr&#244;leur retournant les jetons au client (le code d'autorisation dans le cas du flux d'autorisation avec code). A ce moment, la validit&#233; du cookie SLI est rafraichie &#224; sa valeur initiale.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; En cas d'&#233;chec : soit il y a retour standard au client avec une erreur, soit le contr&#244;leur pr&#233;sente le formulaire de login si la constante REAUTHENTICATE_NO_ROUNDTRIP est true. Dans un cas comme dans l'autre, le cookie SLI est d'abord d&#233;truit.&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Si le cookie SLI est absent :&lt;/p&gt;
&lt;ul class=&#034;spip&#034;&gt;&lt;li&gt; si l'application cliente ne pr&#233;sente pas le scope 'sli', le contr&#244;leur agit de fa&#231;on standard.&lt;/li&gt;&lt;li&gt; si l'application cliente autorise le SLI, et si l'authentification mentionn&#233;e pr&#233;c&#233;demment r&#233;ussit, un cookie SLI est enregistr&#233; sur l'agent dans le domaine du serveur. C'est le seul cas o&#249; le cookie SLI est cr&#233;&#233;.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Notes :&lt;/strong&gt;
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Toute erreur &#034;technique&#034; (autre que les erreurs non-r&#233;p&#233;t&#233;es de l'utilisateur dans l'entr&#233;e de son login ou de son mot de passe) conduit &#224; la destruction du cookie SLI afin de prot&#233;ger l'application contre les tentatives d'intrusion. Dans un tel cas le serveur ne r&#233;pond pas pour ne pas orienter l'attaquant.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Une tentative de connexion sous un identifiant d'utilisateur diff&#233;rent provoque &#233;galement la destruction du cookie SLI, et conduit &#224; la pr&#233;sentation du formulaire d'identification.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Une tentative de se connecter depuis un poste de travail diff&#233;rent a le m&#234;me effet.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; La fonctionnalit&#233; SLI est active dans les trois flux OpenID Connect, donc avec le plus s&#233;curis&#233; : Autorisation avec code. Ceci est un avantage par rapport &#224; des solutions souvent pr&#233;sent&#233;es utilisant le flux Implicite.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Le comportement des demandes avec prompt = 'none', 'login' et 'consent' reste conforme au standard.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Lorsque l'utilisateur change d'application et b&#233;n&#233;ficie du SLI, de nouvelles demandes de consentement pourraient lui &#234;tre pr&#233;sent&#233;es.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;D&#233;connexion unique (Single Login Out, SLO)&lt;/h3&gt;
&lt;p&gt;Le serveur expose un &lt;strong&gt;point de terminaison logout&lt;/strong&gt;, permettant de d&#233;connecter l'utilisateur de toutes les applications clientes.&lt;/p&gt;
&lt;p&gt;La &lt;a href='https://oa.dnc.global/-API-OpenID-Connect-Points-d-extremite-.html#apiopenidconnectlogoutlogoutendpoint' class='spip_in'&gt;demande de d&#233;connexion unique&lt;/a&gt; se fait comme une demande d'introspection en fournissant le jeton d'identit&#233;.&lt;/p&gt;
&lt;p&gt;Lorsque la d&#233;connexion est effectu&#233;e, tous les jetons d'acc&#232;s enregistr&#233;s sur le serveur pour le sujet consid&#233;r&#233; 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;Notez que les application clientes doivent &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#monitoringdeletatdelauthentificationetslo' class='spip_in'&gt;g&#233;rer la d&#233;connexion&lt;/a&gt; &#224; leur niveau, il n'y a pas de miracle !&lt;/p&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 'login_required'. Cette solution a l'avantage de r&#233;pondre totalement &#224; la norme OpenID Connect dans son &#233;tat d&#233;finitif.&lt;br class='autobr' /&gt;
&lt;a id=&#034;sra&#034;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;R&#233;-authentification silencieuse (Silent Re-Authentication, SRA)&lt;/h3&gt;
&lt;p&gt;Dans le cadre du serveur OAuthSD, cette fonctionnalit&#233; r&#233;sulte directement du SLI&lt;span class=&#034;spip_note_ref&#034;&gt; [&lt;a href='#nb5-2' class='spip_note' rel='appendix' title='D'autres impl&#233;mentations font appel &#224; de nombreux d&#233;veloppements du c&#244;t&#233; des (...)' id='nh5-2'&gt;2&lt;/a&gt;]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;S'agissant des applications n'autorisant pas le SLI, elles ne b&#233;n&#233;ficient pas du SRA. Mais il est probable que les raisons qui ont conduit &#224; ne pas autoriser le SLI conduiraient &#224; ne pas autoriser le SRA.&lt;/p&gt;
&lt;p&gt;Notons :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; qu'il est toujours possible de &lt;a href='https://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;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; l'existence de la m&#233;thode &lt;a href='https://oa.dnc.global/-OpenID-Connect-Autorisation-via-un-code-Authorization-Code-Flow-.html#id_token_hintreauthentificationsilencieusedusujetaveclidtoken' class='spip_in'&gt;id_token_hint : r&#233;-authentification silencieuse du sujet avec l'ID Token&lt;/a&gt;.&lt;/p&gt;
&lt;h3 class=&#034;spip&#034;&gt;Le Cookie SLI&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Le cookie SLI est un concept propre &#224; DnC permettant au serveur OAuthSD d'offrir toutes les fonctionnalit&#233;s de la connexion unique (SLI, SLO, SRA, SLO) sans modification des applications clientes&lt;/strong&gt; pourvu qu'elles soient d&#233;j&#224; interfac&#233;es avec OpenID Connect. Compte-tenu de la complexit&#233; et de la diversit&#233; des solutions propos&#233;es par ailleurs, qui n'ont pas fait &#224; ce jour (d&#233;but 2019) de sp&#233;cification d&#233;finitive, c'est une contribution majeure d'OAuthSD &#224; OpenID Connect.&lt;/p&gt;
&lt;p&gt;Le cookie SLI est cr&#233;&#233; par le contr&#244;leur Authorize si le SLI est autoris&#233; pour l'application cliente (scope 'sli').&lt;/p&gt;
&lt;p&gt;Le cookie SLI est doublement s&#233;curis&#233; :
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Le cookie SLI est chiffr&#233; par un algorithme sym&#233;trique fort dont la cl&#233; est connue du seul serveur.
&lt;br /&gt;&lt;img src='https://oa.dnc.global/local/cache-vignettes/L8xH11/puce-32883.gif?1733817730' width='8' height='11' class='puce' alt=&#034;-&#034; /&gt; Il est enregistr&#233; dans le domaine du serveur, n'est disponible qu'&#224; travers une connexion s&#233;curis&#233;e par HTTPS et pour le protocole HTTP seulement (il n'est pas accessible par les scripts c&#244;t&#233; user-agent).&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;Ces fonctionnalit&#233;s sont souvent comprises comme faisant partie du SSO, mais en toute rigueur le SSO ne signifie que &#034;inscription unique&#034;.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb5-2'&gt;
&lt;p&gt;&lt;span class=&#034;spip_note_ref&#034;&gt;[&lt;a href='#nh5-2' class='spip_note' title='Notes 5-2' rev='appendix'&gt;2&lt;/a&gt;] &lt;/span&gt;D'autres impl&#233;mentations font appel &#224; de nombreux d&#233;veloppements du c&#244;t&#233; des applications . La solution offerte par OAuthSD a l'&#233;norme avantage de ne pas n&#233;cessiter de modification &#224; l'application cliente. Cependant, la solution n'est pas standard. Le management de session OpenID Connect faisant l'objet d'une proposition de standard (voir &lt;a href='https://oa.dnc.global/-OpenID-Connect-SSO-management-de-session-etc-.html#openidconnectsessionmanagement' class='spip_in'&gt;OpenID Connect Session Management&lt;/a&gt;), OAuthSD offre &#233;galement cette derni&#232;re m&#233;thode.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;Le cookie SLI contient les donn&#233;es suivantes :&lt;/p&gt;
&lt;p&gt;&lt;img src='https://oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; sliID : la valeur de state au moment de la cr&#233;ation du cookie,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; sub : l'identit&#233; de l'utilisateur final authentifi&#233;, ou subject (champ username de la table users),
&lt;br /&gt;&lt;img src='https://oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; client_id : l'identit&#233; de l'application cliente (seule cette valeur peut changer au cours de la vie du cookie SLI), &lt;br /&gt;&lt;img src='https://oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; ufp (user's footprint) l'empreinte de l'user-agent de utilisateur,
&lt;br /&gt;&lt;img src='https://oa.dnc.global/squelettes-dist/puce.gif' width=&#034;8&#034; height=&#034;11&#034; class=&#034;puce&#034; alt=&#034;-&#034; /&gt; authtime : instant (secondes de l'Epoch UNIX) au moment de la cr&#233;ation.&lt;/p&gt;
&lt;p&gt;L'identit&#233; de l'application cliente varie si l'utilisateur final passe d'une application &#224; l'autre. Toutes les autres donn&#233;es sont immuables.&lt;/p&gt;
&lt;p&gt;La dur&#233;e de vie du cookie SLI est fix&#233;e par la constante SLI_COOKIE_LIFETIME. Une valeur de 3600 secondes parait convenable.&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		

	</item>



</channel>

</rss>
