Package org.firebirdsql.gds.ng.wire.auth
Class ClientAuthBlock
- java.lang.Object
- 
- org.firebirdsql.gds.ng.wire.auth.ClientAuthBlock
 
- 
 public final class ClientAuthBlock extends java.lang.ObjectManages client authentication with multiple pluginProviders.This is similar to the ClntAuthBlockin 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 SummaryConstructors Constructor Description ClientAuthBlock(IAttachProperties<?> attachProperties)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationPlugin.AuthStatusauthenticate()voidauthenticateStep0()voidauthFillParametersBlock(ConnectionParameterBuffer pb)byte[]getClientData()java.lang.StringgetCurrentPluginName()java.lang.StringgetLogin()java.lang.StringgetNormalizedLogin()java.lang.StringgetPassword()java.lang.StringgetPluginNames()byte[]getSessionKey()booleanhasPlugin()booleanisAuthComplete()booleanisFirstTime()voidresetClient(byte[] serverInfo)voidsetAuthComplete(boolean authComplete)voidsetFirstTime(boolean firstTime)voidsetServerData(byte[] serverData)booleansupportsEncryption()TODO Need to handle this differentlybooleanswitchPlugin(java.lang.String pluginName)voidwritePluginDataTo(java.io.OutputStream userId)
 
- 
- 
- 
Constructor Detail- 
ClientAuthBlockpublic ClientAuthBlock(IAttachProperties<?> attachProperties) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 
- 
 - 
Method Detail- 
getLoginpublic java.lang.String getLogin() 
 - 
getNormalizedLoginpublic java.lang.String getNormalizedLogin() 
 - 
getPasswordpublic java.lang.String getPassword() 
 - 
isAuthCompletepublic boolean isAuthComplete() 
 - 
setAuthCompletepublic void setAuthComplete(boolean authComplete) 
 - 
getCurrentPluginNamepublic java.lang.String getCurrentPluginName() 
 - 
getPluginNamespublic java.lang.String getPluginNames() - Returns:
- Comma separated list of available plugins.
 
 - 
getClientDatapublic byte[] getClientData() 
 - 
setFirstTimepublic void setFirstTime(boolean firstTime) 
 - 
isFirstTimepublic boolean isFirstTime() 
 - 
authenticateStep0public void authenticateStep0() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
resetClientpublic void resetClient(byte[] serverInfo) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setServerDatapublic void setServerData(byte[] serverData) 
 - 
writePluginDataTopublic void writePluginDataTo(java.io.OutputStream userId) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
switchPluginpublic boolean switchPlugin(java.lang.String pluginName) 
 - 
hasPluginpublic boolean hasPlugin() 
 - 
authenticatepublic AuthenticationPlugin.AuthStatus authenticate() throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
authFillParametersBlockpublic void authFillParametersBlock(ConnectionParameterBuffer pb) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
supportsEncryptionpublic boolean supportsEncryption() throws java.sql.SQLExceptionTODO Need to handle this differently- Returns:
- trueif the encryption is supported
- Throws:
- java.sql.SQLException- If it is impossible to determine if encryption is supported (e.g. there is no current auth plugin)
 
 - 
getSessionKeypublic byte[] getSessionKey() throws java.sql.SQLException- Returns:
- Session key
- Throws:
- java.sql.SQLException- If a session key cannot be provided
 
 
- 
 
-