congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Notification (javax.management)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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