AuthorizationService

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(New page: 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. == Configuration == To...)
 
(Configuration)
Line 15: Line 15:
 
     AuthorizationServerURI = "http://localhost/auth.php"
 
     AuthorizationServerURI = "http://localhost/auth.php"
 
</code>
 
</code>
 +
 +
 +
== Message Formats ==
 +
 +
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
 +
AuthorizationRequest object.
 +
 +
'''Example'''
 +
<code>
 +
    <?xml version="1.0" encoding="utf-8"?>
 +
    <AuthorizationRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 +
        <ID>decc5198-9de2-11de-be89-00145eecaa9a</ID>
 +
        <FirstName>Rob</FirstName>
 +
        <SurName>Smart</SurName>
 +
        <Email>user@host.com</Email>
 +
        <RegionName>test region</RegionName>
 +
        <RegionID>e276e142-a099-4d6d-8f2d-0aad91ede958</RegionID>
 +
    </AuthorizationRequest>
 +
 +
</code>
 +
 +
The authorization service needs to respond with an XML message that matches an XML serialized AuthorizationResponse object.
 +
 +
'''Example'''
 +
<code>
 +
    <?xml version="1.0" encoding="utf-8"?>
 +
    <AuthorizationResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 +
        <IsAuthorized>true</IsAuthorized>
 +
        <Message>Rob Smart has been authorized for the region test region.</Message>
 +
    </AuthorizationResponse>
 +
 +
</code>
 +
 +
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
 +
will only be shown on the OpenSim region console.

Revision as of 11:50, 11 September 2009

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.


Configuration

To point your region at an external Authorization service edit the file

bin/config-include/GridCommon.ini

add a section such as the following, altering the URI to point to your authorization server

   [AuthorizationService]
   ;
   ; change this to your grid-wide authorization server
   ;
   AuthorizationServerURI = "http://localhost/auth.php"


Message Formats

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 AuthorizationRequest object.

Example

   <?xml version="1.0" encoding="utf-8"?>
   <AuthorizationRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <ID>decc5198-9de2-11de-be89-00145eecaa9a</ID>
       <FirstName>Rob</FirstName>
       <SurName>Smart</SurName>
       <Email>user@host.com</Email>
       <RegionName>test region</RegionName>
       <RegionID>e276e142-a099-4d6d-8f2d-0aad91ede958</RegionID>
   </AuthorizationRequest>

The authorization service needs to respond with an XML message that matches an XML serialized AuthorizationResponse object.

Example

   <?xml version="1.0" encoding="utf-8"?>
   <AuthorizationResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <IsAuthorized>true</IsAuthorized>
       <Message>Rob Smart has been authorized for the region test region.</Message>
   </AuthorizationResponse>

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 will only be shown on the OpenSim region console.

Personal tools
General
About This Wiki