Поделиться через


IPassportManager3::LogoutURL

IPassportManager3::LogoutURL

Returns the URL of the appropriate network Sign-out page, including any necessary query string parameters.

This method typically returns the same URL as LogoTag2 does in its sign-out case. Be sure, however, that this URL is displayed to users only in circumstances in which they are actually signed in. The LogoutURL method makes no effort to determine user state independently.

Syntax

HRESULT LogoutURL(
    VARIANT returnUrl,
    VARIANT coBrandArgs,
    VARIANT lang_id,
    VARIANT domain,
    VARIANT bSecure,
    BSTR *pVal
);

Parameters

  • returnUrl
    [in, optional] A VARIANT (should be VT_BSTR) that specifies the URL to which the Login server's Sign-out page should redirect users after sign-out is complete. Using the Server.URLEncode method, always URL-encode this string. (See IServer::URLEncode in the IIS reference.) If returnUrl is left empty, the registry default is used; the registry default may not be appropriate because it is more typically intended as a default after sign-in, not sign-out. If returning to a port other than 80, specify the port in the URL. This parameter must point to a named file, not just a root.
  • coBrandArgs
    [in, optional] A VARIANT (should be VT_BSTR) that specifies variables to be appended as query string variables to the URL of the participating site's cobranding template script page. Always URL-encode the entire string given to this parameter. Participating sites specify the cobranding template base URL at initial registration time. If left blank, this parameter defaults to registry default, if any. Do not add the question mark character ("?") to form the query string. The string should consist of one or more key-value pairs with an equal sign ("=") between key and value, and an ampersand ("&") between key-value pairs if more than one are given. For information about using variables to modify cobranding of the .NET Passport network Sign-out page, see .NET Passport Cobranding Overview.
  • lang_id
    [in, optional] A VARIANT (should be VT_I4) specifying the language in which the Sign-out page should be displayed to the user. This value is the integer representation of a standard locale ID (LCID). For example, U.S. English (EN/US, the default) is 1033. For a table of LCIDs, see Localization and .NET Passport Services.
  • domain
    [in, optional] A VARIANT (VT_BSTR) that can be used to override the domain authority as detected by user context. In most cases, sites should accept the user context rather than trying to specify a particular domain authority that will serve the Sign-out page.
  • bSecure
    [in, optional] A VARIANT (should be VT_BOOL). Default is VARIANT_FALSE. Indicates whether the Sign-out page itself should be served using HTTPS protocol. Setting bSecure to VARIANT_TRUE may be appropriate in cases in which the entire series of .NET Passport pages, including all site pages, have been served HTTPS, and you wish to avoid a secure/insecure transition for users who click the sign-out URL link produced by this method. By default, the Sign-out page is served HTTP and would thus present a secure/insecure transition in this situation.
  • pVal
    [out, retval] Pointer to a VARIANT (VT_BSTR) containing the URL of the Sign-out page at the .NET Passport domain authority's Login server.

For information about calling methods with optional VARIANT inputs, see Passing Empty Variants.

Return values

Returns the following value:

S_OK Success.
PP_E_NOT_CONFIGURED Passport Manager configuration settings in registry are missing or bad.
E_INVALIDARG A supplied input parameter was not a variant or was a variant type that could not be coerced into an acceptable type for that parameter. This error is returned whether invalid values come from a specific call or from registry defaults.

Remarks

Site-wide configuration also allows a site to configure a global logout URL. If such a logout URL is specified as part of site configuration, the site configuration always overrides the URL specified by any Passport Manager application programming interface (API) call. (This also applies to the sign-out case for LogoTag2.) If you have specified a site-wide logout URL and wish to change it, sign in to .NET Services Manager to make the change before attempting to use this method.

Successful sign-out of users from your site also depends on correct implementation of a cookie-delete page or an equivalent ISAPI or programmatic solution for overwriting and expiring the .NET Passport cookies written by Passport Manager. For more information, see Implementing Sign-Out and Deleting Cookies.

Under no circumstances should sites redirect directly to this URL without allowing users to choose whether they actually want to sign out of .NET Passport.

See Also

IPassportManager2.LogoTag2 | Registering Your .NET Passport Site