V3 Support

The V3 webapps need SSO capability and use OpenID. We need to send both our OpenID server url and a token for the user in the login response.
0.7.4.1
BlueWall 2012-02-22 16:36:28 -05:00
parent 67bea681e2
commit 165ae251ec
3 changed files with 25 additions and 2 deletions

View File

@ -171,6 +171,9 @@ namespace OpenSim.Services.LLLoginService
// Web Profiles
private string profileURL;
// OpenID
private string openIDURL;
private string searchURL;
// Error Flags
@ -223,7 +226,7 @@ namespace OpenSim.Services.LLLoginService
public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string searchURL, string currency)
GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency)
: this()
{
FillOutInventoryData(invSkel, libService);
@ -241,6 +244,7 @@ namespace OpenSim.Services.LLLoginService
StartLocation = where;
MapTileURL = mapTileURL;
ProfileURL = profileURL;
OpenIDURL = openIDURL;
SearchURL = searchURL;
Currency = currency;
@ -390,6 +394,7 @@ namespace OpenSim.Services.LLLoginService
initialOutfit.Add(InitialOutfitHash);
mapTileURL = String.Empty;
profileURL = String.Empty;
openIDURL = String.Empty;
searchURL = String.Empty;
currency = String.Empty;
@ -465,6 +470,10 @@ namespace OpenSim.Services.LLLoginService
if (profileURL != String.Empty)
responseData["profile-server-url"] = profileURL;
// We need to send an openid_token back in the response too
if (openIDURL != String.Empty)
responseData["openid_url"] = openIDURL;
if (m_buddyList != null)
{
responseData["buddy-list"] = m_buddyList.ToArray();
@ -573,6 +582,9 @@ namespace OpenSim.Services.LLLoginService
if (profileURL != String.Empty)
map["profile-server-url"] = OSD.FromString(profileURL);
if (openIDURL != String.Empty)
map["openid_url"] = OSD.FromString(openIDURL);
if (searchURL != String.Empty)
map["search"] = OSD.FromString(searchURL);
@ -951,6 +963,12 @@ namespace OpenSim.Services.LLLoginService
set { profileURL = value; }
}
public string OpenIDURL
{
get { return openIDURL; }
set { openIDURL = value; }
}
public string SearchURL
{
get { return searchURL; }

View File

@ -75,6 +75,7 @@ namespace OpenSim.Services.LLLoginService
protected bool m_AllowRemoteSetLoginLevel;
protected string m_MapTileURL;
protected string m_ProfileURL;
protected string m_OpenIDURL;
protected string m_SearchURL;
protected string m_Currency;
@ -110,6 +111,7 @@ namespace OpenSim.Services.LLLoginService
m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty);
m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty);
m_ProfileURL = m_LoginServerConfig.GetString("ProfileServerURL", string.Empty);
m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty);
m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty);
m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty);
@ -415,7 +417,7 @@ namespace OpenSim.Services.LLLoginService
// Finally, fill out the response and return it
//
LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_ProfileURL, m_SearchURL, m_Currency);
where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency);
m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client.");
return response;

View File

@ -227,6 +227,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
; For V2/3 Web Profiles
ProfileServerURL = "http://127.0.0.1/profiles/[AGENT_NAME]
; For V2/V3 webapp authentication SSO
OpenIDServerURL = "http://127.0.0.1/openid/openidserver/
; If you run this login server behind a proxy, set this to true
; HasProxy = false