]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/browser/AuthenticationEvent.java
Remove invalid SHA-256-Digests
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / browser / AuthenticationEvent.java
1 /*******************************************************************************
2  * Copyright (c) 2003, 2009 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.browser;
15
16 import org.eclipse.swt.widgets.*;
17 import org.eclipse.swt.events.*;
18
19 /**
20  * An <code>AuthenticationEvent</code> is sent by a {@link Browser}
21  * to {@link AuthenticationListener}'s when the <code>Browser</code>
22  * navigates to a page that requires authentication. This event allows
23  * a client to either supply authentication credentials, cancel the
24  * authentication, or do nothing (which causes an authentication prompter
25  * to be shown to the user).
26  *
27  * @since 3.5
28  */
29 public class AuthenticationEvent extends TypedEvent {
30         /** The location that triggered the authentication challenge */
31         public String location;
32
33         /** The user name to authenticate with */
34         public String user;
35
36         /** The password to authenticate with */
37         public String password;
38
39         /**
40          * A flag indicating whether the authentication should proceed.
41          * Setting this field to <code>false</code> will cancel the operation.
42          */
43         public boolean doit = true;
44
45         static final long serialVersionUID = -8322331206780057921L;
46
47 /**
48  * Constructs a new instance of this class.
49  *
50  * @param widget the widget that fired the event
51  *
52  * @since 3.5
53  */
54 public AuthenticationEvent(Widget widget) {
55         super(widget);
56 }
57
58 /**
59  * Returns a string containing a concise, human-readable
60  * description of the receiver.
61  *
62  * @return a string representation of the event
63  */
64 @Override
65 public String toString() {
66         String string = super.toString ();
67         return string.substring (0, string.length() - 1) // remove trailing '}'
68                 + " name=" + user
69                 + " password=" + password
70                 + " location=" + location
71                 + "}";
72 }
73 }