File tree 1 file changed +5
-5
lines changed
firebase-installations/src/main/java/com/google/firebase/installations
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,19 +42,19 @@ class Utils {
42
42
/** Length of new-format FIDs as introduced in 2019. */
43
43
public static final int FID_LENGTH = 22 ;
44
44
45
- private static final long AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS = 3600L ; // 1 hour
45
+ private static final long AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS = TimeUnit . HOURS . toSeconds ( 1 );
46
46
47
47
Utils (Clock clock ) {
48
48
this .clock = clock ;
49
49
}
50
50
51
51
/**
52
- * Checks if the FIS Auth token is expired or going to expire in next 1 hour
53
- * ( AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS) .
52
+ * Checks if the FIS Auth token is expired or going to expire in next 1 hour {@link
53
+ * # AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS} .
54
54
*/
55
55
public boolean isAuthTokenExpired (PersistedFidEntry persistedFidEntry ) {
56
- return ( persistedFidEntry .getTokenCreationEpochInSecs () + persistedFidEntry .getExpiresInSecs ()
57
- > currentTimeInSecs () + AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS ) ;
56
+ return persistedFidEntry .getTokenCreationEpochInSecs () + persistedFidEntry .getExpiresInSecs ()
57
+ > currentTimeInSecs () + AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS ;
58
58
}
59
59
60
60
/** Returns current time in seconds. */
You can’t perform that action at this time.
0 commit comments