Package org.postgresql.core.v3
Class ScramAuthenticator
- java.lang.Object
-
- org.postgresql.core.v3.ScramAuthenticator
-
final class ScramAuthenticator extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
ScramAuthenticator.BodySender
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Logger
LOGGER
private PGStream
pgStream
private com.ongres.scram.client.ScramClient
scramClient
-
Constructor Summary
Constructors Constructor Description ScramAuthenticator(char[] password, PGStream pgStream, java.util.Properties info)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.List<java.lang.String>
advertisedMechanisms(PGStream stream, ChannelBindingOption channelBinding)
private static byte[]
getChannelBindingData(PGStream stream, ChannelBindingOption channelBinding)
(package private) void
handleAuthenticationSASL()
(package private) void
handleAuthenticationSASLContinue(int length)
(package private) void
handleAuthenticationSASLFinal(int length)
private static com.ongres.scram.client.ScramClient
initializeScramClient(char[] password, PGStream stream, java.util.Properties info)
private void
sendAuthenticationMessage(int bodyLength, ScramAuthenticator.BodySender bodySender)
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
pgStream
private final PGStream pgStream
-
scramClient
private final com.ongres.scram.client.ScramClient scramClient
-
-
Constructor Detail
-
ScramAuthenticator
ScramAuthenticator(char[] password, PGStream pgStream, java.util.Properties info) throws PSQLException
- Throws:
PSQLException
-
-
Method Detail
-
initializeScramClient
private static com.ongres.scram.client.ScramClient initializeScramClient(char[] password, PGStream stream, java.util.Properties info) throws PSQLException
- Throws:
PSQLException
-
advertisedMechanisms
private static java.util.List<java.lang.String> advertisedMechanisms(PGStream stream, ChannelBindingOption channelBinding) throws PSQLException, java.io.IOException
- Throws:
PSQLException
java.io.IOException
-
getChannelBindingData
private static byte[] getChannelBindingData(PGStream stream, ChannelBindingOption channelBinding) throws PSQLException
- Throws:
PSQLException
-
handleAuthenticationSASL
void handleAuthenticationSASL() throws java.io.IOException
- Throws:
java.io.IOException
-
handleAuthenticationSASLContinue
void handleAuthenticationSASLContinue(int length) throws java.io.IOException, PSQLException
- Throws:
java.io.IOException
PSQLException
-
handleAuthenticationSASLFinal
void handleAuthenticationSASLFinal(int length) throws java.io.IOException, PSQLException
- Throws:
java.io.IOException
PSQLException
-
sendAuthenticationMessage
private void sendAuthenticationMessage(int bodyLength, ScramAuthenticator.BodySender bodySender) throws java.io.IOException
- Throws:
java.io.IOException
-
-