Exemplo n.º 1
0
				/// <summary>
				/// Creates an instance of the change password control.
				/// </summary>
				/// <param name="container">Control containing this control.</param>
				/// <param name="securityProvider">Current security control.</param>
				public ChangePassword(ControlContainer container, WebSecurityProvider securityProvider)
				{
					
					m_container = container;
					m_securityProvider = securityProvider;
					
				}
Exemplo n.º 2
0
Arquivo: Login.cs Projeto: avs009/gsf
				/// <summary>
				/// Creates an instance of the login control.
				/// </summary>
				/// <param name="container">Control containing this control.</param>
				/// <param name="securityProvider">Current security control.</param>
				public Login(ControlContainer container, WebSecurityProvider securityProvider)
				{
					
					m_container = container;
					m_securityProvider = securityProvider;
					
				}
Exemplo n.º 3
0
				/// <summary>
				/// Creates an instance of the container control.
				/// </summary>
				/// <param name="securityProvider">Current security control.</param>
				/// <param name="activeControl">Link text of the default active control.</param>
				public ControlContainer(WebSecurityProvider securityProvider, string activeControl)
				{
					
					m_controls = new Dictionary<string, Control>(StringComparer.CurrentCultureIgnoreCase);
					
					// Add the default controls.
					AddControl("Login", new Login(this, securityProvider));
					AddControl("Change Password", new ChangePassword(this, securityProvider));
					
					// Set the default property values.
					this.Width = Unit.Parse("75px");
					this.HelpText = "For immediate assistance, please contact the Operations Duty Specialist at 423-751-1700.";
					this.CompanyText = "TENNESSEE VALLEY AUTHORITY";
					this.ActiveControl = activeControl;
					
				}
Exemplo n.º 4
0
            /// <summary>
            /// Saves security data to the session.
            /// </summary>
            /// <param name="page">Page through which session can be accessed.</param>
            /// <param name="data">Security data to be saved in the session.</param>
            /// <returns>True if security data is saved; otherwise False.</returns>
            public static bool SaveToCache(Page page, WebSecurityProvider data)
            {

                if (page.Session[DataKey] == null)
                {
                    // Before caching the security control in the current user's session, we break-off the reference
                    // that the security control has to the page so that the page doesn't get cached unnecessarily.
                    data.Parent = null;
                    page.Session[WebSecurityProvider.DataKey] = data;

                    return true;
                }

            }
Exemplo n.º 5
0
			/// <summary>
			/// Initializes a new instance of PCS.Web.UI.SecureUserControl class.
			/// </summary>
			/// <param name="applicationName">Name of the application as in the security database.</param>
			/// <param name="securityServer">One of the PCS.Security.Application.SecurityServer values.</param>
			/// <param name="authenticationMode">One of the PCS.Security.Application.AuthenticationMode values.</param>
			public SecureUserControl(string applicationName, SecurityServer securityServer, AuthenticationMode authenticationMode)
			{
				
				m_securityProvider = new WebSecurityProvider();
				m_securityProvider.BeforeLoginPrompt += new System.EventHandler`1[[System.ComponentModel.CancelEventArgs, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](m_securityProvider_BeforeLoginPrompt);
Exemplo n.º 6
0
			/// <summary>
			/// Initializes a new instance of PCS.Web.UI.SecurePage class.
			/// </summary>
			/// <param name="applicationName">Name of the application as in the security database.</param>
			/// <param name="securityServer">One of the PCS.Security.Application.SecurityServer values.</param>
			/// <param name="authenticationMode">One of the PCS.Security.Application.AuthenticationMode values.</param>
			public SecurePage(string applicationName, SecurityServer securityServer, AuthenticationMode authenticationMode)
			{
				
				m_securityProvider = new WebSecurityProvider();
				m_securityProvider.AccessDenied += new System.EventHandler`1[[System.ComponentModel.CancelEventArgs, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](m_securityProvider_AccessDenied);