Partager via


Sys.Services AuthenticationService defaultLogoutCompletedCallback Property

Gets or sets the name of the default logout-completed callback function.

Note

To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.

Sys.Services.AuthenticationService.set_defaultLogoutCompletedCallback(value); 
var defaultLogoutCompletedCallback = 
  Sys.Services.AuthenticationService.get_defaultLogoutCompletedCallback();

Parameters

Parameter

Description

value

A string that contains the name of the default logout-completed callback function.

Remarks

The function that you assign to the defaultLogoutCompletedCallback property is used as the default callback function for the logout process. You can override this default callback function by passing the name of a different function to the logout method.

When implementing this callback function, you must use the following signature:

function LogoutComplete(result, userContext, methodName)

The parameters passed to the callback function have the following meaning:

  • result. Returns null. This parameter is reserved for future use.

  • userContext. The user context information that you pass to the logout method.

  • methodName. The name of the calling method.

The callback function is called asynchronously if the authentication service logout finishes.

Example

The following example shows how to use the defaultLogoutCompletedCallback property. This code is part of a complete example found in the Sys.Services.AuthenticationService class overview.

// This function sets and gets the default
// logout completed callback function.
function SetDefaultLogoutCompletedCallBack()
{
    // Set the default callback function.
    Sys.Services.AuthenticationService.set_defaultLogoutCompletedCallback(OnLogoutCompleted);

    // Get the default callback function.
    var callBack =     
        Sys.Services.AuthenticationService.get_defaultLogoutCompletedCallback();
}

See Also

Concepts

Sys.Services.ProfileService Class

Sys.Net.WebServiceProxy Class