<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aolp</id>
		<title>OpenSimulator - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aolp"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Special:Contributions/Aolp"/>
		<updated>2026-05-07T19:00:35Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/wiki/AuthorizationService</id>
		<title>AuthorizationService</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/AuthorizationService"/>
				<updated>2011-11-03T16:51:42Z</updated>
		
		<summary type="html">&lt;p&gt;Aolp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;Insert non-formatted text here&amp;lt;/nowiki&amp;gt;The Authorization service is currently just a skeleton to be later expanded, however in grid mode it can be used to communicate an external authorization service. &lt;br /&gt;
&lt;br /&gt;
[http://www.bestessay.com essays]&lt;br /&gt;
== Configuration ==&lt;br /&gt;
To point your region at an external Authorization service edit the file&lt;br /&gt;
&lt;br /&gt;
'''bin/config-include/GridCommon.ini'''&lt;br /&gt;
&lt;br /&gt;
add a section such as the following, altering the URI to point to your authorization server&lt;br /&gt;
&amp;lt;source lang=ini&amp;gt;&lt;br /&gt;
    [AuthorizationService]&lt;br /&gt;
    ;&lt;br /&gt;
    ; change this to your grid-wide authorization server&lt;br /&gt;
    ;&lt;br /&gt;
    AuthorizationServerURI = &amp;quot;http://localhost/auth.php&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Message Formats ==&lt;br /&gt;
&lt;br /&gt;
When a user attempts to enter a region an HTTP POST will be made to the AuthorizationServerURI you specified in the config. The body of the POST will be an XML serialized&lt;br /&gt;
AuthorizationRequest object.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;AuthorizationRequest xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;ID&amp;gt;decc5198-9de2-11de-be89-00145eecaa9a&amp;lt;/ID&amp;gt;&lt;br /&gt;
        &amp;lt;FirstName&amp;gt;Rob&amp;lt;/FirstName&amp;gt;&lt;br /&gt;
        &amp;lt;SurName&amp;gt;Smart&amp;lt;/SurName&amp;gt;&lt;br /&gt;
        &amp;lt;Email&amp;gt;user@host.com&amp;lt;/Email&amp;gt;&lt;br /&gt;
        &amp;lt;RegionName&amp;gt;test region&amp;lt;/RegionName&amp;gt;&lt;br /&gt;
        &amp;lt;RegionID&amp;gt;e276e142-a099-4d6d-8f2d-0aad91ede958&amp;lt;/RegionID&amp;gt;&lt;br /&gt;
    &amp;lt;/AuthorizationRequest&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The authorization service needs to respond with an XML message that matches an XML serialized AuthorizationResponse object.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;AuthorizationResponse xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;IsAuthorized&amp;gt;true&amp;lt;/IsAuthorized&amp;gt;&lt;br /&gt;
        &amp;lt;Message&amp;gt;Rob Smart has been authorized for the region test region.&amp;lt;/Message&amp;gt;&lt;br /&gt;
    &amp;lt;/AuthorizationResponse&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''IsAuthorized''' element must contain either the string '''true''' or the string '''false'''. The '''Message''' element can contain any string, at the moment this message&lt;br /&gt;
will only be shown on the OpenSim region console.&lt;br /&gt;
&lt;br /&gt;
== Example PHP ==&lt;br /&gt;
A basic php example for parsing the Authorization XML and responding.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=php&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
        &lt;br /&gt;
    class AuthorizationResponse&lt;br /&gt;
    {&lt;br /&gt;
    	private $m_isAuthorized;&lt;br /&gt;
    	private $m_message;&lt;br /&gt;
    	&lt;br /&gt;
    	public function AuthorizationResponse($isAuthorized,$message)&lt;br /&gt;
    	{&lt;br /&gt;
    		$this-&amp;gt;m_isAuthorized = $isAuthorized;&lt;br /&gt;
    		$this-&amp;gt;m_message = $message;&lt;br /&gt;
    	}&lt;br /&gt;
    	&lt;br /&gt;
    	public function toXML()&lt;br /&gt;
    	{&lt;br /&gt;
    		return '&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;AuthorizationResponse xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot;&amp;gt;&amp;lt;IsAuthorized&amp;gt;'. $this-&amp;gt;m_isAuthorized .'&amp;lt;/IsAuthorized&amp;gt;&amp;lt;Message&amp;gt;'. $this-&amp;gt;m_message .'&amp;lt;/Message&amp;gt;&amp;lt;/AuthorizationResponse&amp;gt;';&lt;br /&gt;
    		&lt;br /&gt;
    	}&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    class AuthorizationRequest&lt;br /&gt;
    {&lt;br /&gt;
    	private $m_isAuthorized;&lt;br /&gt;
    	private $m_message;    	&lt;br /&gt;
    	public $ID;&lt;br /&gt;
    	public $FirstName;&lt;br /&gt;
    	public $SurName;&lt;br /&gt;
    	public $Email;&lt;br /&gt;
    	public $RegionName;&lt;br /&gt;
    	public $RegionID;    	&lt;br /&gt;
    	&lt;br /&gt;
    	public function parseRequest($request)&lt;br /&gt;
    	{&lt;br /&gt;
    		$reader = new XMLReader();&lt;br /&gt;
&lt;br /&gt;
                $reader-&amp;gt;XML($request);&lt;br /&gt;
			while ($reader-&amp;gt;read()) &lt;br /&gt;
			{&lt;br /&gt;
      			if ($reader-&amp;gt;nodeType == XMLReader::ELEMENT) &lt;br /&gt;
      			{&lt;br /&gt;
      				switch($reader-&amp;gt;name)&lt;br /&gt;
      				{&lt;br /&gt;
      					case 'AuthorizationRequest':&lt;br /&gt;
      						//$log-&amp;gt;write(&amp;quot;AuthorizationRequest element&amp;quot;);&lt;br /&gt;
      					break;	&lt;br /&gt;
      					case 'ID':&lt;br /&gt;
      						$reader-&amp;gt;read();&lt;br /&gt;
      						$this-&amp;gt;ID = $reader-&amp;gt;value;&lt;br /&gt;
      					break;&lt;br /&gt;
      					case 'FirstName':&lt;br /&gt;
      						$reader-&amp;gt;read();&lt;br /&gt;
      						$this-&amp;gt;FirstName = $reader-&amp;gt;value;&lt;br /&gt;
      					break;&lt;br /&gt;
      					case 'SurName':&lt;br /&gt;
      						$reader-&amp;gt;read();&lt;br /&gt;
      						$this-&amp;gt;SurName = $reader-&amp;gt;value;&lt;br /&gt;
      					break;&lt;br /&gt;
      					case 'Email':&lt;br /&gt;
      						$reader-&amp;gt;read();&lt;br /&gt;
      						$this-&amp;gt;Email = $reader-&amp;gt;value;&lt;br /&gt;
      					break;&lt;br /&gt;
      					case 'RegionName':&lt;br /&gt;
      						$reader-&amp;gt;read();&lt;br /&gt;
      						$this-&amp;gt;RegionName = $reader-&amp;gt;value;&lt;br /&gt;
      					break;&lt;br /&gt;
      					case 'RegionID':&lt;br /&gt;
      						$reader-&amp;gt;read();&lt;br /&gt;
      						$this-&amp;gt;RegionID = $reader-&amp;gt;value;&lt;br /&gt;
      					break;&lt;br /&gt;
      				}&lt;br /&gt;
      	&lt;br /&gt;
      			}&lt;br /&gt;
      			&lt;br /&gt;
			}&lt;br /&gt;
    	}	&lt;br /&gt;
    	&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    $request = @file_get_contents('php://input');&lt;br /&gt;
&lt;br /&gt;
    $authReq = new AuthorizationRequest();&lt;br /&gt;
    $authReq-&amp;gt;parseRequest($request);&lt;br /&gt;
&lt;br /&gt;
    $authResp = new AuthorizationResponse(&amp;quot;true&amp;quot;,&amp;quot;You are authorized&amp;quot;);&lt;br /&gt;
    echo $authResp-&amp;gt;toXML();&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aolp</name></author>	</entry>

	</feed>