You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-vault-core/src/main/java/org/springframework/vault/authentication/LifecycleAwareSessionManager.java
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -44,15 +44,15 @@
44
44
* <p>
45
45
* This {@link SessionManager} also implements {@link DisposableBean} to revoke the
46
46
* {@link LoginToken} once it's not required anymore. Token revocation will stop regular
47
-
* token refresh. Tokens are only revoked only if the associated
48
-
* {@link ClientAuthentication} returns a {@link LoginToken}.
47
+
* token refresh. Tokens are only revoked if the associated {@link ClientAuthentication}
48
+
* returns a {@link LoginToken#isServiceToken() service token}.
49
49
* <p>
50
50
* If Token renewal runs into a client-side error, it assumes the token was
51
51
* revoked/expired. It discards the token state so the next attempt will lead to another
52
52
* login attempt.
53
53
* <p>
54
-
* By default, {@link VaultToken} are looked up in Vault to determine renewability and the
55
-
* remaining TTL, see {@link #setTokenSelfLookupEnabled(boolean)}.
54
+
* By default, {@link VaultToken} are looked up in Vault to determine renewability,
55
+
* remaining TTL, accessor and type, see {@link #setTokenSelfLookupEnabled(boolean)}.
56
56
* <p>
57
57
* The session manager dispatches authentication events to {@link AuthenticationListener}
58
58
* and {@link AuthenticationErrorListener}. Event notifications are dispatched either on
@@ -390,7 +390,12 @@ public VaultToken getToken() {
390
390
}
391
391
392
392
publicbooleanisRevocable() {
393
-
returnthis.revocable;
393
+
394
+
if (tokeninstanceofLoginTokenlogin && login.isServiceToken()) {
0 commit comments