From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- .../manual/core/en/zend.gdata.authsub.html | 253 +++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 zend/documentation/manual/core/en/zend.gdata.authsub.html (limited to 'zend/documentation/manual/core/en/zend.gdata.authsub.html') diff --git a/zend/documentation/manual/core/en/zend.gdata.authsub.html b/zend/documentation/manual/core/en/zend.gdata.authsub.html new file mode 100644 index 0000000..078e3da --- /dev/null +++ b/zend/documentation/manual/core/en/zend.gdata.authsub.html @@ -0,0 +1,253 @@ + + +
+ +
+
+ Authenticating with AuthSub+ The AuthSub mechanism enables you to write web applications + that acquire authenticated access Google Data services, + without having to write code that handles user credentials. + + ++ See » http://code.google.com/apis/accounts/AuthForWebApps.html + for more information about Google Data AuthSub authentication. + + ++ The Google documentation says the ClientLogin mechanism is appropriate + for "installed applications" whereas the AuthSub mechanism is + for "web applications." The difference is that AuthSub requires + interaction from the user, and a browser interface that can react + to redirection requests. The ClientLogin solution uses PHP code to + supply the account credentials; the user is not required to enter her + credentials interactively. + + ++ The account credentials supplied via the AuthSub mechanism are + entered by the user of the web application. Therefore they must be + account credentials that are known to that user. + + ++ + Creating an AuthSub authenticated Http Client+ Your PHP application should provide a hyperlink to the + Google URL that performs authentication. The static function + Zend_Gdata_AuthSub::getAuthSubTokenUri() + provides the correct URL. The arguments to this function include + the URL to your PHP application so that Google can + redirect the user's browser back to your application after the user's + credentials have been verified. + + ++ After Google's authentication server redirects the user's browser + back to the current application, a GET request parameter is set, + called token. The value of this parameter is a single-use token + that can be used for authenticated access. This token can be converted into a multi-use + token and stored in your session. + + ++ Then use the token value in a call to + Zend_Gdata_AuthSub::getHttpClient(). + This function returns an instance of Zend_Http_Client, + with appropriate headers set so that subsequent requests your + application submits using that HTTP Client are also authenticated. + + ++ Below is an example of PHP code for a web application + to acquire authentication to use the Google Calendar service + and create a Zend_Gdata client object using that authenticated + HTTP Client. + + +
Revoking AuthSub authentication+ To terminate the authenticated status of a given token, use the + Zend_Gdata_AuthSub::AuthSubRevokeToken() + static function. Otherwise, the token is still valid for + some time. + + +
+ + +
|
+
+
|
+