org.apache.http.impl.auth.win
Class CurrentWindowsCredentials
java.lang.Object
org.apache.http.impl.auth.win.CurrentWindowsCredentials
- All Implemented Interfaces:
- Serializable, Principal, Credentials
@Contract(threading=IMMUTABLE)
public final class CurrentWindowsCredentials
- extends Object
- implements Credentials, Serializable, Principal
Returns the current Windows user credentials
EXPERIMENTAL
- Since:
- 4.4
- See Also:
- Serialized Form
INSTANCE
public static final CurrentWindowsCredentials INSTANCE
getCurrentUsername
public static String getCurrentUsername()
- Get the SAM-compatible username of the currently logged-on user.
- Returns:
- String.
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interface Credentials
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Principal
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Principal
- Overrides:
equals
in class Object
toString
public String toString()
- Specified by:
toString
in interface Principal
- Overrides:
toString
in class Object
getPassword
public String getPassword()
- Returns an empty password
- Specified by:
getPassword
in interface Credentials
getName
public String getName()
- Specified by:
getName
in interface Principal
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.