Tabnine Logo
DefaultAccessTokenConverter.getAudience
Code IndexAdd Tabnine to your IDE (free)

How to use
getAudience
method
in
org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter

Best Java code snippets using org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter.getAudience (Showing top 2 results out of 315)

origin: spring-projects/spring-security-oauth

public OAuth2Authentication extractAuthentication(Map<String, ?> map) {
  Map<String, String> parameters = new HashMap<String, String>();
  Set<String> scope = extractScope(map);
  Authentication user = userTokenConverter.extractAuthentication(map);
  String clientId = (String) map.get(clientIdAttribute);
  parameters.put(clientIdAttribute, clientId);
  if (includeGrantType && map.containsKey(GRANT_TYPE)) {
    parameters.put(GRANT_TYPE, (String) map.get(GRANT_TYPE));
  }
  Set<String> resourceIds = new LinkedHashSet<String>(map.containsKey(AUD) ? getAudience(map)
      : Collections.<String>emptySet());
  
  Collection<? extends GrantedAuthority> authorities = null;
  if (user==null && map.containsKey(AUTHORITIES)) {
    @SuppressWarnings("unchecked")
    String[] roles = ((Collection<String>)map.get(AUTHORITIES)).toArray(new String[0]);
    authorities = AuthorityUtils.createAuthorityList(roles);
  }
  OAuth2Request request = new OAuth2Request(parameters, clientId, authorities, true, scope, resourceIds, null, null,
      null);
  return new OAuth2Authentication(request, user);
}
origin: org.springframework.security.oauth/spring-security-oauth2

public OAuth2Authentication extractAuthentication(Map<String, ?> map) {
  Map<String, String> parameters = new HashMap<String, String>();
  Set<String> scope = extractScope(map);
  Authentication user = userTokenConverter.extractAuthentication(map);
  String clientId = (String) map.get(clientIdAttribute);
  parameters.put(clientIdAttribute, clientId);
  if (includeGrantType && map.containsKey(GRANT_TYPE)) {
    parameters.put(GRANT_TYPE, (String) map.get(GRANT_TYPE));
  }
  Set<String> resourceIds = new LinkedHashSet<String>(map.containsKey(AUD) ? getAudience(map)
      : Collections.<String>emptySet());
  
  Collection<? extends GrantedAuthority> authorities = null;
  if (user==null && map.containsKey(AUTHORITIES)) {
    @SuppressWarnings("unchecked")
    String[] roles = ((Collection<String>)map.get(AUTHORITIES)).toArray(new String[0]);
    authorities = AuthorityUtils.createAuthorityList(roles);
  }
  OAuth2Request request = new OAuth2Request(parameters, clientId, authorities, true, scope, resourceIds, null, null,
      null);
  return new OAuth2Authentication(request, user);
}
org.springframework.security.oauth2.provider.tokenDefaultAccessTokenConvertergetAudience

Popular methods of DefaultAccessTokenConverter

  • extractAuthentication
  • <init>
  • convertAccessToken
  • setUserTokenConverter
    Converter for the part of the data in the token representing a user.
  • extractAccessToken
  • extractScope
  • setIncludeGrantType
    Flag to indicate the the grant type should be included in the converted token.

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Notification (javax.management)
  • JLabel (javax.swing)
  • CodeWhisperer alternatives
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