@Extension @Symbol(value="legacyApiTokenUsage") @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public class LegacyApiTokenAdministrativeMonitor extends AdministrativeMonitor
Modifier and Type | Class and Description |
---|---|
static class |
LegacyApiTokenAdministrativeMonitor.RevokeAllSelectedModel |
static class |
LegacyApiTokenAdministrativeMonitor.RevokeAllSelectedUserAndUuid |
ExtensionPoint.LegacyInstancesAreScopedToHudson
id
Constructor and Description |
---|
LegacyApiTokenAdministrativeMonitor() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doIndex() |
org.kohsuke.stapler.HttpResponse |
doRevokeAllSelected(LegacyApiTokenAdministrativeMonitor.RevokeAllSelectedModel content) |
String |
getDisplayName() |
List<User> |
getImpactedUserList() |
ApiTokenProperty.TokenInfoAndStats |
getLegacyStatsOf(User user,
ApiTokenStore.HashedToken legacyToken) |
ApiTokenStore.HashedToken |
getLegacyTokenOf(User user) |
boolean |
hasFreshToken(User user,
ApiTokenProperty.TokenInfoAndStats legacyStats)
Determine if the user has at least one "new" token that was created after the last use of the legacy token
|
boolean |
hasMoreRecentlyUsedToken(User user,
ApiTokenProperty.TokenInfoAndStats legacyStats)
Determine if the user has at least one "new" token that was used after the last use of the legacy token
|
boolean |
isActivated()
Returns true if this monitor is activated and
wants to produce a warning message.
|
boolean |
isSecurity()
Returns true if this monitor is security related.
|
all, disable, doDisable, getRequiredPermission, getSearchUrl, getTarget, getUrl, isEnabled
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
public String getDisplayName()
getDisplayName
in interface ModelObject
getDisplayName
in class AdministrativeMonitor
public boolean isActivated()
AdministrativeMonitor
This method is called from the HTML rendering thread, so it should run efficiently.
isActivated
in class AdministrativeMonitor
public boolean isSecurity()
AdministrativeMonitor
isSecurity
in class AdministrativeMonitor
public org.kohsuke.stapler.HttpResponse doIndex() throws IOException
IOException
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<User> getImpactedUserList()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nullable public ApiTokenStore.HashedToken getLegacyTokenOf(@NonNull User user)
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nullable public ApiTokenProperty.TokenInfoAndStats getLegacyStatsOf(@NonNull User user, ApiTokenStore.HashedToken legacyToken)
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean hasFreshToken(@NonNull User user, ApiTokenProperty.TokenInfoAndStats legacyStats)
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean hasMoreRecentlyUsedToken(@NonNull User user, ApiTokenProperty.TokenInfoAndStats legacyStats)
public org.kohsuke.stapler.HttpResponse doRevokeAllSelected(@JsonBody LegacyApiTokenAdministrativeMonitor.RevokeAllSelectedModel content) throws IOException
IOException
Copyright © 2004–2021. All rights reserved.