java.lang.Object
org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock
Manages client authentication with multiple pluginProviders.
This is similar to the ClntAuthBlock
in Firebird. For ease of understanding, and correlating with the
Firebird implementation, this uses the same (or very similar) terms and structure (if it makes sense).
- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
byte[]
getLogin()
byte[]
boolean
boolean
boolean
void
resetClient
(byte[] serverInfo) void
setAuthComplete
(boolean authComplete) void
setFirstTime
(boolean firstTime) void
setServerData
(byte[] serverData) boolean
TODO Need to handle this differentlyboolean
switchPlugin
(String pluginName) void
writePluginDataTo
(OutputStream userId)
-
Constructor Details
-
ClientAuthBlock
- Throws:
SQLException
-
-
Method Details
-
getLogin
-
getNormalizedLogin
-
getPassword
-
isAuthComplete
public boolean isAuthComplete() -
setAuthComplete
public void setAuthComplete(boolean authComplete) -
getCurrentPluginName
-
getPluginNames
- Returns:
- Comma separated list of available plugins.
-
getClientData
public byte[] getClientData() -
setFirstTime
public void setFirstTime(boolean firstTime) -
isFirstTime
public boolean isFirstTime() -
authenticateStep0
- Throws:
SQLException
-
resetClient
- Throws:
SQLException
-
setServerData
public void setServerData(byte[] serverData) -
writePluginDataTo
- Throws:
IOException
-
switchPlugin
-
hasPlugin
public boolean hasPlugin() -
authenticate
- Throws:
SQLException
-
authFillParametersBlock
- Throws:
SQLException
-
supportsEncryption
TODO Need to handle this differently- Returns:
true
if the encryption is supported- Throws:
SQLException
- If it is impossible to determine if encryption is supported (e.g. there is no current auth plugin)
-
getSessionKey
- Returns:
- Session key
- Throws:
SQLException
- If a session key cannot be provided
-