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 TypeMethodDescriptionvoidvoidbyte[]getLogin()byte[]booleanbooleanbooleanvoidresetClient(byte[] serverInfo) voidsetAuthComplete(boolean authComplete) voidsetFirstTime(boolean firstTime) voidsetServerData(byte[] serverData) booleanTODO Need to handle this differentlybooleanswitchPlugin(String pluginName) voidwritePluginDataTo(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:
trueif 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
-