public class LastGrantedAuthoritiesProperty extends UserProperty
GrantedAuthority
s that was obtained the last time the user has logged in.
This allows us to implement User.impersonate2()
with proper set of groups.ImpersonatingUserDetailsService
Modifier and Type | Class and Description |
---|---|
static class |
LastGrantedAuthoritiesProperty.DescriptorImpl |
static class |
LastGrantedAuthoritiesProperty.SecurityListenerImpl
Listen to the login success/failure event to persist
GrantedAuthority s properly. |
ExtensionPoint.LegacyInstancesAreScopedToHudson
user
Constructor and Description |
---|
LastGrantedAuthoritiesProperty() |
Modifier and Type | Method and Description |
---|---|
GrantedAuthority[] |
getAuthorities()
Deprecated.
|
Collection<? extends org.springframework.security.core.GrantedAuthority> |
getAuthorities2() |
void |
invalidate()
Removes the recorded information
|
UserProperty |
reconfigure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject form)
Stick to the same object since there's no UI for this.
|
void |
update(org.springframework.security.core.Authentication auth)
Persist the information with the new
UserDetails . |
all, getDescriptor, setUser
public UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) throws Descriptor.FormException
reconfigure
in interface ReconfigurableDescribable<UserProperty>
reconfigure
in class UserProperty
req
- The current HTTP request being processed.form
- JSON fragment that corresponds to this describable object.
If the newly submitted form doesn't include a fragment for this describable
(meaning the user has de-selected your descriptor), then this argument is null.Descriptor.FormException
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities2()
@Deprecated public GrantedAuthority[] getAuthorities()
getAuthorities2()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public void update(@NonNull org.springframework.security.core.Authentication auth) throws IOException
UserDetails
.IOException
public void invalidate() throws IOException
IOException
Copyright © 2004–2021. All rights reserved.