public class LastGrantedAuthoritiesProperty extends UserProperty
GrantedAuthority
s that was obtained the last time the user has logged in.
This allows us to implement User.impersonate()
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 |
---|---|
org.acegisecurity.GrantedAuthority[] |
getAuthorities() |
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.acegisecurity.Authentication auth)
Persist the information with the new
UserDetails . |
all, getDescriptor
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 org.acegisecurity.GrantedAuthority[] getAuthorities()
public void update(@Nonnull org.acegisecurity.Authentication auth) throws IOException
UserDetails
.IOException
public void invalidate() throws IOException
IOException
Copyright © 2019. All rights reserved.