JDBCAuthenticatorpublic class TerminalAuthenticator extends java.lang.Object implements JDBCAuthenticator
| Constructor | Description |
|---|---|
TerminalAuthenticator() |
Constructs a new authenticator which uses System.err for prompting.
|
TerminalAuthenticator(java.io.PrintStream promptStrm) |
Constructs a new authenticator with a given stream to use for
writing prompts.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String[] |
authenticate() |
Obtains username and password.
|
java.lang.String |
readPassword() |
Prompts to the prompt stream and reads the password from standard
input.
|
java.lang.String |
readUser() |
Prompts to the prompt stream and reads the user name from standard
input.
|
public TerminalAuthenticator(java.io.PrintStream promptStrm)
promptStrm - output stream for promptingpublic TerminalAuthenticator()
public java.lang.String[] authenticate()
throws java.io.IOException
JDBCAuthenticatorauthenticate in interface JDBCAuthenticatorjava.io.IOException - if there is some errorpublic java.lang.String readUser()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String readPassword()
throws java.io.IOException
java.io.IOExceptionCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.