Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
a180c6b896
2 changed files with 9 additions and 7 deletions
|
@ -173,7 +173,7 @@ public class KeycloakInstalled {
|
|||
}
|
||||
|
||||
public String getTokenString(long minValidity, TimeUnit unit) throws VerificationException, IOException, ServerRequest.HttpFailure {
|
||||
long expires = token.getExpiration() * 1000 - unit.toMillis(minValidity);
|
||||
long expires = ((long) token.getExpiration()) * 1000 - unit.toMillis(minValidity);
|
||||
if (expires < System.currentTimeMillis()) {
|
||||
refreshToken();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public class SocialUser {
|
|||
}
|
||||
|
||||
public void setName(String name) {
|
||||
if (name != null) {
|
||||
int i = name.lastIndexOf(' ');
|
||||
if (i != -1) {
|
||||
firstName = name.substring(0, i);
|
||||
|
@ -42,6 +43,7 @@ public class SocialUser {
|
|||
firstName = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setName(String firstName, String lastName) {
|
||||
this.firstName = firstName;
|
||||
|
|
Loading…
Reference in a new issue