YahooSession
YahooSession
( $consumer, $accessToken, $applicationId)
-
$consumer
-
$accessToken
-
$applicationId
void
accessTokenExpired
( $accessToken, $consumer, $applicationId, $sessionStore)
-
$accessToken
-
$consumer
-
$applicationId
-
$sessionStore
boolean
checkSession
( &$sessionType, $sessionStore)
-
&$sessionType
-
$sessionStore
Destroys the current session, effectively logging out the current user.
Destroys the current session, effectively logging out the current user.
void
clearSession
([$sessionStore $sessionStore = NULL])
-
$sessionStore
$sessionStore: The session store implementation to clear. See YahooSessionStore for more information. If no session store is provided, clearSession will instantiate a NativeSessionStore and use that.
Creates authorization URLs, allowing applications to manage their user experience when the user needs to be sent to Yahoo! to authorize the application to access their account.
Creates authorization URLs, allowing applications to manage their user experience when the user needs to be sent to Yahoo! to authorize the application to access their account.
stdclass
createAuthorizationUrl
($consumerKey $consumerKey, $consumerSecret $consumerSecret, [$callback $callback = NULL], [$sessionStore $sessionStore = NULL])
-
$consumerKey
$consumerKey: The OAuth consumer key.
-
$consumerSecret
$consumerSecret: The OAuth consumer key secret.
-
$callback
$callback: The callback URL to redirect the user to after they verify the application access. If no callback is provided, the current page URL will be used. Use the "oob" callback for desktop clients or for web clients where no callback should be used.
-
$sessionStore
$sessionStore: The session store implementation to use. See YahooSessionStore for more information. If no session store is provided, createAuthorizationUrl will instantiate a NativeSessionStore and use that.
Gets the user who owns the application install.
Gets the user who owns the application install. Only valid when viewed in YAP, otherwise will default to the logged-in user.
Gets the currently sessioned user.
Gets the currently sessioned user.
Gets the user indicated by the GUID given.
Gets the user indicated by the GUID given.
-
$guid
$guid: The GUID of the user to get.
Checks to see if there is a session in this PHP page request.
Checks to see if there is a session in this PHP page request. Doesn't cause any redirects for the user to log in, for that you should call requireSession().
boolean
hasSession
($consumerKey $consumerKey, $consumerSecret $consumerSecret, [$applicationId $applicationId = NULL], [$sessionStore $sessionStore = NULL], [ $verifier = NULL])
-
$consumerKey
$consumerKey: The OAuth consumer key.
-
$consumerSecret
$consumerSecret: The OAuth consumer key secret.
-
$applicationId
$applicationId: The application ID, optional.
-
$sessionStore
$sessionStore: The session store implementation to use. See YahooSessionStore for more information. If no session store is provided, clearSession will instantiate a NativeSessionStore and use that.
-
$verifier
void
initSession
( $consumerKey, $consumerSecret, $applicationId, $redirect, $callback, $sessionStore, $verifier)
-
$consumerKey
-
$consumerSecret
-
$applicationId
-
$redirect
-
$callback
-
$sessionStore
-
$verifier
void
initSessionFromYAP
( $consumerKey, $consumerSecret, $appid)
-
$consumerKey
-
$consumerSecret
-
$appid
Executes the given YQL query.
Executes the given YQL query.
The
query
($yql $yql, [$env $env = NULL])
-
$yql
$yql: The query to execute.
-
$env
$env: A URL to a YQL environment file.
void
redirectForAuthorization
( $consumerKey, $consumerSecret, [ $callback = NULL], [ $sessionStore = NULL])
-
$consumerKey
-
$consumerSecret
-
$callback
-
$sessionStore
Requires that there be a session in this PHP page request. a redirect for the user to log in, if necessary. requireSession() before any data is sent back to the user in order for the redirect to work.
Requires that there be a session in this PHP page request. Generates a redirect for the user to log in, if necessary. You must call requireSession() before any data is sent back to the user in order for the redirect to work.
YahooSession
requireSession
(
$consumerKey $consumerKey,
$consumerSecret $consumerSecret, [
$applicationId $applicationId =
NULL], [
$callback $callback =
NULL], [
$sessionStore $sessionStore =
NULL], [
$verifier $verifier =
NULL])
-
$consumerKey
$consumerKey: The OAuth consumer key.
-
$consumerSecret
$consumerSecret: The OAuth consumer key secret.
-
$applicationId
$applicationId: The application ID, optional.
-
$callback
$callback: The callback URL to redirect the user to after they verify the application access. If no callback is provided, the current page URL will be used.
-
$sessionStore
$sessionStore: The session store implementation to use. See YahooSessionStore for more information. If no session store is provided, clearSession will instantiate a NativeSessionStore and use that.
-
$verifier
$verifier: The oauth_verifier returned by the OAuth servers after authorization. Passing NULL indicates that authorization was completed previously or that requireSession() should look for oauth_verifier in the $_GET superglobal.