Initialize the WindowsLiveLogin module with the application ID, secret key and security algorithm.
We recommend that you employ strong measures to protect the secret key. The secret key should never be exposed to the Web or other users.
Be aware that if you do not supply these settings at initialization time, you may need to set the application ID, secret key and security algorithm using the appropriate setters.
| WindowsLiveLogin::debug | ( | $ | string | ) | [private] |
| WindowsLiveLogin::decodeToken | ( | $ | token | ) |
| WindowsLiveLogin::derive | ( | $ | secret, | |
| $ | prefix | |||
| ) | [private] |
| WindowsLiveLogin::e64 | ( | $ | input | ) | [private] |
| WindowsLiveLogin::fatal | ( | $ | string | ) | [private] |
| WindowsLiveLogin::fetch | ( | $ | url | ) | [private] |
| WindowsLiveLogin::getAppId | ( | ) |
Returns the application ID.
Returns the URL needed to retrieve the application security token.
By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteid'. The IP address can also optionally be included in 'ip'.
If 'js' is false, then JavaScript Output Notation (JSON) output is returned:
{"token":"<value>"}
Otherwise, a JavaScript response is returned. It is assumed that WLIDResultCallback is a custom function implemented to handle the token value:
WLIDResultCallback("<tokenvalue>");
| WindowsLiveLogin::getAppRetCode | ( | ) |
Returns a string that can be passed to the GetTrustedParams function as the 'retcode' parameter.
If this is specified as the 'retcode', then the app will be used as return URL after it finishes trusted login.
Retrieves the application security token for application verification from the application login URL.
By default, the application security token will be generated for the Windows Live site; a specific Site ID can optionally be specified in 'siteid'. The IP address can also optionally be included in 'ip'.
Implementation note: The application security token is downloaded from the application login URL in JSON format {"token":"<value>"}, so we need to extract
from the string and return it as seen here.
References $body, $ip, $matches, count, debug(), and fetch().
| WindowsLiveLogin::getAppVerifier | ( | $ | ip = null |
) |
| WindowsLiveLogin::getBaseUrl | ( | ) |
| WindowsLiveLogin::getClearCookieResponse | ( | ) |
When a user signs out of Windows Live or a Windows Live application, a best-effort attempt is made at signing out the user from all other Windows Live applications the user might be logged in to.
This is done by calling the handler page for each application with 'action' set to 'clearcookie' in the query string. The application handler is then responsible for clearing any cookies or data associated with the login. After successfully logging out the user, the handler should return a GIF (any GIF) as response to the action=clearcookie query.
This function returns an appropriate content type and body response that the application handler can return to signify a successful sign-out from the application.
| WindowsLiveLogin::getLoginUrl | ( | $ | context = null |
) |
| WindowsLiveLogin::getLogoutUrl | ( | ) |
Returns the sign-out URL to use for Windows Live Login.
We recommend that you use the Sign In control instead.
| WindowsLiveLogin::getSecureUrl | ( | ) |
Get the secure (HTTPS) URL to use for the Windows Live Login server.
You should not have to use this.
| WindowsLiveLogin::getSecurityAlgorithm | ( | ) |
Get the version of the security algorithm being used.
| WindowsLiveLogin::getTimestamp | ( | ) | [private] |
Generates a timestamp suitable for the application verifier token.
| WindowsLiveLogin::getTrustedLoginUrl | ( | ) |
Returns the trusted sign-in URL to use for Windows Live Login.
| WindowsLiveLogin::getTrustedLogoutUrl | ( | ) |
Returns the trusted sign-out URL to use for Windows Live Login.
| WindowsLiveLogin::getTrustedParams | ( | $ | user, | |
| $ | retcode = null | |||
| ) |
Returns a table of key-value pairs that must be posted to the login URL for trusted login.
Use HTTP POST to do this. Be aware that the values in the table are neither URL nor HTML escaped and may have to be escaped if you are inserting them in code such as an HTML form.
User to be trusted on the local site is passed in as string 'user'.
Optionally, 'retcode' specifies the resource to which successful login is redirected, such as Windows Live Mail, and is typically a string in the format 'id=2000'. If you pass in the value from GetAppRetCode instead, login will be redirected to the application. Otherwise, an HTTP 200 response is returned.
| WindowsLiveLogin::getTrustedToken | ( | $ | user | ) |
| static WindowsLiveLogin::initFromXml | ( | $ | settingsFile | ) | [static] |
Initialize the WindowsLiveLogin module from a settings file.
'settingsFile' specifies the location of the XML settings file containing the application ID, secret key, and an optional security algorithm. The file is of the following format:
<windowslivelogin> <appid>APPID</appid> <secret>SECRET</secret> <securityalgorithm>wsignin1.0</securityalgorithm> </windowslivelogin>
We recommend that you store the Windows Live Login settings file in an area on your server that cannot be accessed through the Internet. This file contains important confidential information.
Referenced by _get_wll().
| WindowsLiveLogin::parse | ( | $ | input | ) | [private] |
| WindowsLiveLogin::processLogin | ( | $ | query | ) |
Processes the login response from Windows Live Login.
| query | contains the preprocessed POST query, a map of Strings to an an array of Strings, such as that returned by ServletRequest.getParameterMap(). |
| WindowsLiveLogin::processToken | ( | $ | token, | |
| $ | context = null | |||
| ) |
| WindowsLiveLogin::setAppId | ( | $ | appid | ) |
Use this method to set your application ID if you did not provide one at initialization time.
| WindowsLiveLogin::setBaseUrl | ( | $ | baseurl | ) |
| WindowsLiveLogin::setDebug | ( | $ | debug | ) |
| WindowsLiveLogin::setSecret | ( | $ | secret | ) |
You can use this method to set your secret key if one was not provided at initialization time.
| WindowsLiveLogin::setSecureUrl | ( | $ | secureurl | ) |
Set the secure (HTTPS) URL to use for the Windows Live Login server.
You should not have to change this.
| WindowsLiveLogin::setSecurityAlgorithm | ( | $ | securityalgorithm | ) |
Set the version of the security algorithm being used.
| WindowsLiveLogin::signToken | ( | $ | token | ) |
| WindowsLiveLogin::u64 | ( | $ | input | ) | [private] |
| WindowsLiveLogin::validateToken | ( | $ | token | ) |
WindowsLiveLogin::$_appid [private] |
WindowsLiveLogin::$_baseurl [private] |
WindowsLiveLogin::$_cryptkey [private] |
WindowsLiveLogin::$_debug = false [private] |
WindowsLiveLogin::$_secureurl [private] |
WindowsLiveLogin::$_securityalgorithm [private] |
WindowsLiveLogin::$_signkey [private] |
1.5.5-20080420_AX-PHP-Drupal