congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RunAsManagerImpl.getRolePrefix
Code IndexAdd Tabnine to your IDE (free)

How to use
getRolePrefix
method
in
org.springframework.security.access.intercept.RunAsManagerImpl

Best Java code snippets using org.springframework.security.access.intercept.RunAsManagerImpl.getRolePrefix (Showing top 4 results out of 315)

origin: spring-projects/spring-security

public Authentication buildRunAs(Authentication authentication, Object object,
    Collection<ConfigAttribute> attributes) {
  List<GrantedAuthority> newAuthorities = new ArrayList<>();
  for (ConfigAttribute attribute : attributes) {
    if (this.supports(attribute)) {
      GrantedAuthority extraAuthority = new SimpleGrantedAuthority(
          getRolePrefix() + attribute.getAttribute());
      newAuthorities.add(extraAuthority);
    }
  }
  if (newAuthorities.size() == 0) {
    return null;
  }
  // Add existing authorities
  newAuthorities.addAll(authentication.getAuthorities());
  return new RunAsUserToken(this.key, authentication.getPrincipal(),
      authentication.getCredentials(), newAuthorities,
      authentication.getClass());
}
origin: org.springframework.security/spring-security-core

public Authentication buildRunAs(Authentication authentication, Object object,
    Collection<ConfigAttribute> attributes) {
  List<GrantedAuthority> newAuthorities = new ArrayList<>();
  for (ConfigAttribute attribute : attributes) {
    if (this.supports(attribute)) {
      GrantedAuthority extraAuthority = new SimpleGrantedAuthority(
          getRolePrefix() + attribute.getAttribute());
      newAuthorities.add(extraAuthority);
    }
  }
  if (newAuthorities.size() == 0) {
    return null;
  }
  // Add existing authorities
  newAuthorities.addAll(authentication.getAuthorities());
  return new RunAsUserToken(this.key, authentication.getPrincipal(),
      authentication.getCredentials(), newAuthorities,
      authentication.getClass());
}
origin: org.springframework.security/org.springframework.security.core

public Authentication buildRunAs(Authentication authentication, Object object, Collection<ConfigAttribute> attributes) {
  List<GrantedAuthority> newAuthorities = new ArrayList<GrantedAuthority>();
  for (ConfigAttribute attribute : attributes) {
    if (this.supports(attribute)) {
      GrantedAuthority extraAuthority = new SimpleGrantedAuthority(getRolePrefix() + attribute.getAttribute());
      newAuthorities.add(extraAuthority);
    }
  }
  if (newAuthorities.size() == 0) {
    return null;
  }
  // Add existing authorities
  newAuthorities.addAll(authentication.getAuthorities());
  return new RunAsUserToken(this.key, authentication.getPrincipal(), authentication.getCredentials(),
      newAuthorities, authentication.getClass());
}
origin: apache/servicemix-bundles

public Authentication buildRunAs(Authentication authentication, Object object,
    Collection<ConfigAttribute> attributes) {
  List<GrantedAuthority> newAuthorities = new ArrayList<>();
  for (ConfigAttribute attribute : attributes) {
    if (this.supports(attribute)) {
      GrantedAuthority extraAuthority = new SimpleGrantedAuthority(
          getRolePrefix() + attribute.getAttribute());
      newAuthorities.add(extraAuthority);
    }
  }
  if (newAuthorities.size() == 0) {
    return null;
  }
  // Add existing authorities
  newAuthorities.addAll(authentication.getAuthorities());
  return new RunAsUserToken(this.key, authentication.getPrincipal(),
      authentication.getCredentials(), newAuthorities,
      authentication.getClass());
}
org.springframework.security.access.interceptRunAsManagerImplgetRolePrefix

Popular methods of RunAsManagerImpl

  • supports
  • <init>
  • setKey
  • afterPropertiesSet
  • buildRunAs
  • getKey
  • setRolePrefix
    Allows the default role prefix of ROLE_ to be overridden. May be set to an empty value, although thi

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now