/// <summary> /// Get auth code for specified payload for use in SSO process. /// </summary> /// <param name="payload">Payload to sign</param> /// <returns>Specified payload signed with app key and hashed with SHA-1.</returns> public static String GetAuthCode(string payload) { // Get the app key setting. string applicationKey = ConfigurationVariable.GetValue(AppKeyVarName); String signedPayload = payload + "|" + applicationKey; String authCode = FormsAuthentication.HashPasswordForStoringInConfigFile(signedPayload, "SHA1").ToUpper(); return(authCode); }
public void SetAuthenticationCookie(string userName, bool createPersistentCookie) { Authentication.SetAuthCookie(userName, createPersistentCookie); }
public void LogOff() { Authentication.SignOut(); }
public void Logon() { FA.SignOut(); Response.Redirect("/login.aspx"); }