Skip to content

Commit c022e9b

Browse files
author
James Williams
authored
Define password expiry in terms of seconds (#407)
## What is the goal of this PR? We've redefined the way we expose how long until a password expires in seconds, rather than days as was done previously. ## What are the changes implemented in this PR? We've changed `passwordExpiryDays` to `passwordExpirySeconds`. ## Additional notes Must merge typedb/typedb-protocol#181 before.
1 parent 45fc692 commit c022e9b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

api/user/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public interface User {
2929
@CheckReturnValue
3030
String username();
3131

32-
Optional<Long> passwordExpiryDays();
32+
Optional<Long> passwordExpirySeconds();
3333

3434
void passwordUpdate(String passwordOld, String passwordNew);
3535
}

connection/cluster/ClusterUser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public class ClusterUser implements User {
3333

3434
private final ClusterClient client;
3535
private final String username;
36-
private final Optional<Long> passwordExpiryDays;
36+
private final Optional<Long> passwordExpirySeconds;
3737

38-
public ClusterUser(ClusterClient client, String username, Optional<Long> passwordExpiryDays) {
38+
public ClusterUser(ClusterClient client, String username, Optional<Long> passwordExpirySeconds) {
3939
this.client = client;
4040
this.username = username;
41-
this.passwordExpiryDays = passwordExpiryDays;
41+
this.passwordExpirySeconds = passwordExpirySeconds;
4242
}
4343

4444
public static ClusterUser of(ClusterUserProto.User user, ClusterClient client) {
@@ -47,7 +47,7 @@ public static ClusterUser of(ClusterUserProto.User user, ClusterClient client) {
4747
return new ClusterUser(client, user.getUsername(), Optional.empty());
4848
}
4949
else {
50-
return new ClusterUser(client, user.getUsername(), Optional.of(user.getPasswordExpiryDays()));
50+
return new ClusterUser(client, user.getUsername(), Optional.of(user.getPasswordExpirySeconds()));
5151
}
5252
}
5353

@@ -57,8 +57,8 @@ public String username() {
5757
}
5858

5959
@Override
60-
public Optional<Long> passwordExpiryDays() {
61-
return passwordExpiryDays;
60+
public Optional<Long> passwordExpirySeconds() {
61+
return passwordExpirySeconds;
6262
}
6363

6464
@Override

dependencies/vaticle/repositories.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def vaticle_typedb_common():
3232
git_repository(
3333
name = "vaticle_typedb_common",
3434
remote = "https://github.com/vaticle/typedb-common",
35-
tag = "2.16.0" # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_common
35+
commit = "01420b86213dc931ff97188daa06b9ecf06f3932" # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_common
3636
)
3737

3838
def vaticle_dependencies():
@@ -46,7 +46,7 @@ def vaticle_typedb_protocol():
4646
git_repository(
4747
name = "vaticle_typedb_protocol",
4848
remote = "https://github.com/vaticle/typedb-protocol",
49-
tag = "2.16.1", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_protocol
49+
commit = "a22d4eb77c799f93c2898f7e2ef6a9b52ab716f1", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_protocol
5050
)
5151

5252
def vaticle_typedb_behaviour():

0 commit comments

Comments
 (0)