Methods Summary |
---|
private static com.sun.enterprise.security.UsernamePasswordStore | get()This method returns a UsernamePasswordStore, that is
either thread-local or global depending on the system property
IIOP_PER_THREAD_CLIENT_FLAG.
This method is marked as private.
if (isPerThreadAuth) {
return (UsernamePasswordStore) localUpc.get();
} else {
synchronized (UsernamePasswordStore.class) {
return sharedUpc;
}
}
|
public static java.lang.String | getPassword()Returns the password, that was previously stored.
UsernamePasswordStore ups = UsernamePasswordStore.get();
if( ups != null )
return ups.password;
else
return null;
|
public static java.lang.String | getUsername()Returns the username, that was previously stored.
UsernamePasswordStore ups = UsernamePasswordStore.get();
if( ups != null )
return ups.username;
else
return null;
|
public static void | reset()Clears the username and password, that might have been previously stored,
either globally or locally to each thread.
if (isPerThreadAuth) {
localUpc.set(null);
} else {
synchronized (UsernamePasswordStore.class) {
sharedUpc = null;
}
}
|
public static void | resetThreadLocalOnly()Clears the username and password only is they were stored locally
to each thread
if (isPerThreadAuth) {
localUpc.set(null);
}
|
public static void | set(java.lang.String username, java.lang.String password)This method sets the username and password as thread-local or global variable
if (isPerThreadAuth) {
localUpc.set(new UsernamePasswordStore(username, password));
} else {
synchronized (UsernamePasswordStore.class) {
sharedUpc = new UsernamePasswordStore(username, password);
}
}
|