From 165ae251ec132da30dc58513101e4ec438df8d2f Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 22 Feb 2012 16:36:28 -0500 Subject: 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. --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 20 +++++++++++++++++++- OpenSim/Services/LLLoginService/LLLoginService.cs | 4 +++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/LLLoginService') diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index b6f6d31..844c5ae 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -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 invSkel, FriendInfo[] friendsList, ILibraryService libService, string where, string startlocation, Vector3 position, Vector3 lookAt, List 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; } diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 02e62c8..f7b38d4 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -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; -- cgit v1.1