1C-Bitrix 25.700.0
|
Открытые члены | |
setDebug ($debug) | |
debug ($string) | |
fatal ($string) | |
__construct ( $appid=null, $secret=null, $securityalgorithm=null, $force_delauth_nonprovisioned=null, $policyurl=null, $returnurl=null) | |
initFromXml ($settingsFile) | |
setAppId ($appid) | |
getAppId () | |
setSecret ($secret) | |
setOldSecret ($secret) | |
setOldSecretExpiry ($timestamp) | |
getOldSecretExpiry () | |
setSecurityAlgorithm ($securityalgorithm) | |
getSecurityAlgorithm () | |
setForceDelAuthNonProvisioned ($force_delauth_nonprovisioned) | |
setPolicyUrl ($policyurl) | |
getPolicyUrl () | |
setReturnUrl ($returnurl) | |
getReturnUrl () | |
setBaseUrl ($baseurl) | |
getBaseUrl () | |
setSecureUrl ($secureurl) | |
getSecureUrl () | |
setConsentBaseUrl ($consenturl) | |
getConsentBaseUrl () | |
getLoginUrl ($context=null, $market=null) | |
getLogoutUrl ($market=null) | |
processLogin ($query) | |
processToken ($token, $context=null) | |
getClearCookieResponse () | |
getConsentUrl ($offers, $context=null, $ru=null, $market=null) | |
getRefreshConsentTokenUrl ($offers, $refreshtoken, $ru=null) | |
getManageConsentUrl ($market=null) | |
processConsent ($query) | |
processConsentToken ($token, $context=null) | |
refreshConsentToken ($token, $ru=null) | |
refreshConsentToken2 ($offers_string, $refreshtoken, $ru=null) | |
decodeAndValidateToken ($token, $cryptkey=null, $signkey=null, $internal_allow_recursion=true) | |
decodeToken ($token, $cryptkey=null) | |
signToken ($token, $signkey=null) | |
validateToken ($token, $signkey=null) | |
getAppVerifier ($ip=null) | |
getAppLoginUrl ($siteid=null, $ip=null, $js=null) | |
getAppSecurityToken ($siteid=null, $ip=null) | |
getAppRetCode () | |
getTrustedParams ($user, $retcode=null) | |
getTrustedToken ($user) | |
getTrustedLoginUrl () | |
getTrustedLogoutUrl () | |
parseSettings ($settingsFile) | |
derive ($secret, $prefix) | |
parse ($input) | |
getTimestamp () | |
e64 ($input) | |
u64 ($input) | |
fetch ($url) | |
setError ($str) | |
getError () | |
OnExternalAuthList () |
Открытые статические члены | |
static | IsAvailable () |
См. определение в файле liveid.php строка 526
__construct | ( | $appid = null, | |
$secret = null, | |||
$securityalgorithm = null, | |||
$force_delauth_nonprovisioned = null, | |||
$policyurl = null, | |||
$returnurl = null ) |
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 corresponding properties manually.
For Delegated Authentication, you may optionally specify the privacy policy URL and return URL. If you do not specify these values here, the default values that you specified when you registered your application will be used.
The 'force_delauth_nonprovisioned' flag also indicates whether your application is registered for Delegated Authentication (that is, whether it uses an application ID and secret key). We recommend that your Delegated Authentication application always be registered for enhanced security and functionality.
См. определение в файле liveid.php строка 593
debug | ( | $string | ) |
Stub implementation for logging errors. By default, this function does nothing if the debug flag has not been set with setDebug. Otherwise, errors are logged using the PHP error_log function.
См. определение в файле liveid.php строка 551
decodeAndValidateToken | ( | $token, | |
$cryptkey = null, | |||
$signkey = null, | |||
$internal_allow_recursion = true ) |
См. определение в файле liveid.php строка 1331
decodeToken | ( | $token, | |
$cryptkey = null ) |
Decodes the given token string; returns undef on failure.
First, the string is URL-unescaped and base64 decoded. Second, the IV is extracted from the first 16 bytes of the string. Finally, the string is decrypted using the encryption key.
См. определение в файле liveid.php строка 1376
derive | ( | $secret, | |
$prefix ) |
Derives the key, given the secret key and prefix as described in the Web Authentication SDK documentation.
См. определение в файле liveid.php строка 1682
e64 | ( | $input | ) |
Base64-encodes and URL-escapes a string.
См. определение в файле liveid.php строка 1744
fatal | ( | $string | ) |
Stub implementation for handling a fatal error.
См. определение в файле liveid.php строка 563
fetch | ( | $url | ) |
Fetches the contents given a URL.
См. определение в файле liveid.php строка 1767
getAppId | ( | ) |
Returns the application ID.
См. определение в файле liveid.php строка 699
getAppLoginUrl | ( | $siteid = null, | |
$ip = null, | |||
$js = null ) |
Returns the URL that is required to retrieve the application security token.
By default, the application security token is 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 nil, a JavaScript Output Notation (JSON) response is returned in the following format:
{"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>");
См. определение в файле liveid.php строка 1501
getAppRetCode | ( | ) |
Returns a string that can be passed to the getTrustedParams function as the 'retcode' parameter. If this is specified as the 'retcode', the application will be used as return URL after it finishes trusted sign-in.
См. определение в файле liveid.php строка 1554
getAppSecurityToken | ( | $siteid = null, | |
$ip = null ) |
Retrieves the application security token for application verification from the application sign-in 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 sign-in URL in JSON format:
{"token":"<value>"}
Therefore we must extract
from the string and return it as seen here.
См. определение в файле liveid.php строка 1529
getAppVerifier | ( | $ip = null | ) |
Generates an application verifier token. An IP address can optionally be included in the token.
См. определение в файле liveid.php строка 1472
getBaseUrl | ( | ) |
Gets the base URL to use for the Windows Live Login server. You should not have to use this property. Furthermore, we recommend that you use the Sign In control instead of the URL methods provided here.
См. определение в файле liveid.php строка 934
getClearCookieResponse | ( | ) |
Returns an appropriate content type and body response that the application handler can return to signify a successful sign-out from the application.
When a user signs out of Windows Live or a Windows Live application, a best-effort attempt is made at signing the user out from all other Windows Live applications the user might be signed 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 sign-in. After successfully signing the user out, the handler should return a GIF (any GIF) image as response to the 'action=clearcookie' query.
См. определение в файле liveid.php строка 1114
getConsentBaseUrl | ( | ) |
Gets the URL to use for the Windows Live Consent server. You should not have to use or change this directly.
См. определение в файле liveid.php строка 988
getConsentUrl | ( | $offers, | |
$context = null, | |||
$ru = null, | |||
$market = null ) |
См. определение в файле liveid.php строка 1139
getError | ( | ) |
См. определение в файле liveid.php строка 1800
getLoginUrl | ( | $context = null, | |
$market = null ) |
Returns the sign-in URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.
If you specify it, 'context' will be returned as-is in the sign-in response for site-specific use.
См. определение в файле liveid.php строка 1007
getLogoutUrl | ( | $market = null | ) |
Returns the sign-out URL to use for the Windows Live Login server. We recommend that you use the Sign In control instead.
См. определение в файле liveid.php строка 1022
getManageConsentUrl | ( | $market = null | ) |
См. определение в файле liveid.php строка 1203
getOldSecretExpiry | ( | ) |
Gets the old secret key expiry time.
См. определение в файле liveid.php строка 795
getPolicyUrl | ( | ) |
Gets the privacy policy URL for your site.
См. определение в файле liveid.php строка 861
getRefreshConsentTokenUrl | ( | $offers, | |
$refreshtoken, | |||
$ru = null ) |
См. определение в файле liveid.php строка 1168
getReturnUrl | ( | ) |
Returns the return URL of your site.
См. определение в файле liveid.php строка 900
getSecureUrl | ( | ) |
Gets the secure (HTTPS) URL to use for the Windows Live Login server. You should not have to use this functon directly.
См. определение в файле liveid.php строка 961
getSecurityAlgorithm | ( | ) |
Gets the version of the security algorithm being used.
См. определение в файле liveid.php строка 816
getTimestamp | ( | ) |
Generates a time stamp suitable for the application verifier token.
См. определение в файле liveid.php строка 1735
getTrustedLoginUrl | ( | ) |
Returns the trusted sign-in URL to use for Windows Live Login server.
См. определение в файле liveid.php строка 1620
getTrustedLogoutUrl | ( | ) |
Returns the trusted sign-in URL to use for Windows Live Login server.
См. определение в файле liveid.php строка 1630
getTrustedParams | ( | $user, | |
$retcode = null ) |
Returns a table of key-value pairs that must be posted to the sign-in URL for trusted sign-in. 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.
The user to be trusted on the local site is passed in as string 'user'.
Optionally, 'retcode' specifies the resource to which successful sign-in 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, sign-in will be redirected to the application. Otherwise, an HTTP 200 response is returned.
См. определение в файле liveid.php строка 1576
getTrustedToken | ( | $user | ) |
Returns the trusted sign-in token in the format that is needed by a control doing trusted sign-in.
The user to be trusted on the local site is passed in as string 'user'.
См. определение в файле liveid.php строка 1603
initFromXml | ( | $settingsFile | ) |
Initialize the WindowsLiveLogin module from a settings file.
'settingsFile' specifies the location of the XML settings file that contains the application ID, secret key, and security algorithm. The file is of the following format:
<windowslivelogin> <appid>APPID</appid> <secret>SECRET</secret> <securityalgorithm>wsignin1.0</securityalgorithm> </windowslivelogin>
In a Delegated Authentication scenario, you may also specify 'returnurl' and 'policyurl' in the settings file, as shown in the Delegated Authentication samples.
We recommend that you store the WindowsLiveLogin settings file in an area on your server that cannot be accessed through the Internet. This file contains important confidential information.
См. определение в файле liveid.php строка 640
|
static |
См. определение в файле liveid.php строка 1824
OnExternalAuthList | ( | ) |
См. определение в файле liveid.php строка 1808
parse | ( | $input | ) |
Parses query string and returns a hash.
If a hash ref is passed in from CGI->Var, it is dereferenced and returned.
См. определение в файле liveid.php строка 1708
parseSettings | ( | $settingsFile | ) |
Function to parse the settings file.
См. определение в файле liveid.php строка 1641
processConsent | ( | $query | ) |
См. определение в файле liveid.php строка 1218
processConsentToken | ( | $token, | |
$context = null ) |
См. определение в файле liveid.php строка 1241
processLogin | ( | $query | ) |
Processes the sign-in response from Windows Live Login server.
query | contains the preprocessed POST query, a map of Strings to an an array of Strings, such as that returned by ServletRequest.getParameterMap(). |
См. определение в файле liveid.php строка 1039
processToken | ( | $token, | |
$context = null ) |
Decodes and validates a Web Authentication token. Returns a User object on success. If a context is passed in, it will be returned as the context field in the User object.
См. определение в файле liveid.php строка 1057
refreshConsentToken | ( | $token, | |
$ru = null ) |
См. определение в файле liveid.php строка 1293
refreshConsentToken2 | ( | $offers_string, | |
$refreshtoken, | |||
$ru = null ) |
См. определение в файле liveid.php строка 1307
setAppId | ( | $appid | ) |
Sets the application ID. Use this method if you did not specify an application ID at initialization.
См. определение в файле liveid.php строка 680
setBaseUrl | ( | $baseurl | ) |
Sets the base URL to use for the Windows Live Login server. You should not have to change this property. Furthermore, we recommend that you use the Sign In control instead of the URL methods provided here.
См. определение в файле liveid.php строка 922
setConsentBaseUrl | ( | $consenturl | ) |
Sets the Consent Base URL to use for the Windows Live Consent server. You should not have to use or change this property directly.
См. определение в файле liveid.php строка 978
setDebug | ( | $debug | ) |
Stub implementation for logging errors. If you want to enable debugging output, set this to true. In this implementation errors will be logged using the PHP error_log function.
См. определение в файле liveid.php строка 539
setError | ( | $str | ) |
См. определение в файле liveid.php строка 1795
setForceDelAuthNonProvisioned | ( | $force_delauth_nonprovisioned | ) |
Sets a flag that indicates whether Delegated Authentication is non-provisioned (i.e. does not use an application ID or secret key).
См. определение в файле liveid.php строка 834
setOldSecret | ( | $secret | ) |
Sets your old secret key.
Use this property to set your old secret key if you are in the process of transitioning to a new secret key. You may need this property because the Windows Live ID servers can take up to 24 hours to propagate a new secret key after you have updated your application settings.
If an old secret key is specified here and has not expired (as determined by the oldsecretexpiry setting), it will be used as a fallback if token decryption fails with the new secret key.
См. определение в файле liveid.php строка 751
setOldSecretExpiry | ( | $timestamp | ) |
Sets the expiry time for your old secret key.
After this time has passed, the old secret key will no longer be used even if token decryption fails with the new secret key.
The old secret expiry time is represented as the number of seconds elapsed since January 1, 1970.
См. определение в файле liveid.php строка 777
setPolicyUrl | ( | $policyurl | ) |
Sets the privacy policy URL if you did not provide one at initialization time.
См. определение в файле liveid.php строка 846
setReturnUrl | ( | $returnurl | ) |
Sets the return URL–the URL on your site to which the consent service redirects users (along with the action, consent token, and application context) after they have successfully provided consent information for Delegated Authentication. This value will override the return URL specified during registration.
См. определение в файле liveid.php строка 885
setSecret | ( | $secret | ) |
Sets your secret key. Use this method if you did not specify a secret key at initialization.
См. определение в файле liveid.php строка 717
setSecureUrl | ( | $secureurl | ) |
Sets the secure (HTTPS) URL to use for the Windows Live Login server. You should not have to change this property.
См. определение в файле liveid.php строка 951
setSecurityAlgorithm | ( | $securityalgorithm | ) |
Sets the version of the security algorithm being used.
См. определение в файле liveid.php строка 807
signToken | ( | $token, | |
$signkey = null ) |
Creates a signature for the given string by using the signature key.
См. определение в файле liveid.php строка 1405
u64 | ( | $input | ) |
URL-unescapes and Base64-decodes a string.
См. определение в файле liveid.php строка 1756
validateToken | ( | $token, | |
$signkey = null ) |
Extracts the signature from the token and validates it.
См. определение в файле liveid.php строка 1426
$_appid |
См. определение в файле liveid.php строка 673
$_baseurl |
См. определение в файле liveid.php строка 913
$_consenturl |
См. определение в файле liveid.php строка 971
$_cryptkey |
См. определение в файле liveid.php строка 710
$_debug = false |
См. определение в файле liveid.php строка 531
$_error = false |
См. определение в файле liveid.php строка 1793
$_force_delauth_nonprovisioned |
См. определение в файле liveid.php строка 826
$_oldcryptkey |
См. определение в файле liveid.php строка 734
$_oldsecretexpiry |
См. определение в файле liveid.php строка 765
$_oldsignkey |
См. определение в файле liveid.php строка 732
$_policyurl |
См. определение в файле liveid.php строка 840
$_returnurl |
См. определение в файле liveid.php строка 875
$_secureurl |
См. определение в файле liveid.php строка 944
$_securityalgorithm |
См. определение в файле liveid.php строка 801
$_signkey |
См. определение в файле liveid.php строка 708