org.apache.http.impl.auth.win
Class CurrentWindowsCredentials

java.lang.Object
  extended by 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

Field Summary
static CurrentWindowsCredentials INSTANCE
           
 
Method Summary
 boolean equals(Object o)
           
static String getCurrentUsername()
          Get the SAM-compatible username of the currently logged-on user.
 String getName()
           
 String getPassword()
          Returns an empty password
 Principal getUserPrincipal()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final CurrentWindowsCredentials INSTANCE
Method Detail

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.