Skip to content

Commit 994360d

Browse files
committed
Renamed ScramSha1Authenticator to ScramShaAuthenticator
1 parent cf1793f commit 994360d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

driver-core/src/main/com/mongodb/connection/DefaultAuthenticator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void authenticateAsync(final InternalConnection connection, final ConnectionDesc
4040

4141
Authenticator createAuthenticator(final ConnectionDescription connectionDescription) {
4242
if (connectionDescription.getServerVersion().compareTo(new ServerVersion(2, 7)) >= 0) {
43-
return new ScramSha1Authenticator(getCredential());
43+
return new ScramShaAuthenticator(getCredential());
4444
} else {
4545
return new NativeAuthenticator(getCredential());
4646
}

driver-core/src/main/com/mongodb/connection/InternalStreamConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private Authenticator createAuthenticator(final MongoCredential credential) {
7272
case MONGODB_X509:
7373
return new X509Authenticator(credential);
7474
case SCRAM_SHA_1:
75-
return new ScramSha1Authenticator(credential);
75+
return new ScramShaAuthenticator(credential);
7676
case MONGODB_CR:
7777
return new NativeAuthenticator(credential);
7878
default:

driver-core/src/main/com/mongodb/connection/ScramSha1Authenticator.java renamed to driver-core/src/main/com/mongodb/connection/ScramShaAuthenticator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
3939
import static com.mongodb.AuthenticationMechanism.SCRAM_SHA_1;
4040
import static com.mongodb.internal.authentication.NativeAuthenticationHelper.createAuthenticationHash;
4141

42-
class ScramSha1Authenticator extends SaslAuthenticator {
42+
class ScramShaAuthenticator extends SaslAuthenticator {
4343

4444
private final RandomStringGenerator randomStringGenerator;
4545

46-
ScramSha1Authenticator(final MongoCredential credential) {
46+
ScramShaAuthenticator(final MongoCredential credential) {
4747
this(credential, new DefaultRandomStringGenerator());
4848
}
4949

50-
ScramSha1Authenticator(final MongoCredential credential, final RandomStringGenerator randomStringGenerator) {
50+
ScramShaAuthenticator(final MongoCredential credential, final RandomStringGenerator randomStringGenerator) {
5151
super(credential);
5252

5353
this.randomStringGenerator = randomStringGenerator;

driver-core/src/test/unit/com/mongodb/connection/ScramSha1SaslAuthenticatorTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
public class ScramSha1SaslAuthenticatorTest {
3535
private TestInternalConnection connection;
36-
private ScramSha1Authenticator subject;
36+
private ScramShaAuthenticator subject;
3737
private ConnectionDescription connectionDescription;
3838

3939
@Before
@@ -43,13 +43,13 @@ public void before() {
4343
// User name contains ",' and '=" to test user name prepping required by the RFC
4444
MongoCredential credential = MongoCredential.createScramSha1Credential("u,ser=", "database",
4545
"pencil".toCharArray());
46-
ScramSha1Authenticator.RandomStringGenerator randomStringGenerator = new ScramSha1Authenticator.RandomStringGenerator() {
46+
ScramShaAuthenticator.RandomStringGenerator randomStringGenerator = new ScramShaAuthenticator.RandomStringGenerator() {
4747
@Override
4848
public String generate(final int length) {
4949
return "fyko+d2lbbFgONRv9qkxdawL";
5050
}
5151
};
52-
this.subject = new ScramSha1Authenticator(credential, randomStringGenerator);
52+
this.subject = new ScramShaAuthenticator(credential, randomStringGenerator);
5353
}
5454

5555
@Test

0 commit comments

Comments
 (0)