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

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

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

origin: pl.touk.widerest/widerest-api

@Override
public Map<String, ?> convertAccessToken(OAuth2AccessToken token, OAuth2Authentication authentication) {
  Map response = super.convertAccessToken(token, authentication);
  response.put(
      ISS,
      Optional.ofNullable(issuerSupplier)
          .map(Supplier::get)
          .orElse(WIDEREST_ISS)
  );
  return response;
}
origin: com.hand.hap.cloud/hap-oauth-utils

@Override
public Map<String, ?> convertAccessToken(OAuth2AccessToken token,
                     OAuth2Authentication authentication) {
  Map<String,Object> map = (Map<String, Object>) super.convertAccessToken(token, authentication);
  Object details = authentication.getPrincipal();
  if(details instanceof CustomUserDetails){
    CustomUserDetails user = (CustomUserDetails)userDetailsService
        .loadUserByUsername(((CustomUserDetails) details).getUsername());
    map.put("userId",user.getUserId().toString());
    map.put("language", user.getLanguage());
    map.put("timeZone", user.getTimeZone());
    map.put("email", user.getEmail());
    map.put("organizationId", user.getOrganizationId().toString());
    if(user.getAdditionInfo() != null){
      map.put("additionInfo", user.getAdditionInfo());
    }
  }else if(details instanceof String){
    CustomClientDetails client = (CustomClientDetails) clientDetailsService
        .loadClientByClientId((String) details);
    map.put("organizationId", client.getOrganizationId());
    if(client.getAdditionalInformation() != null){
      map.put("additionInfo", client.getAdditionalInformation());
    }
  }
  return map;
}
origin: io.choerodon/choerodon-starter-core

public Map<String, ?> convertAccessToken(OAuth2AccessToken token,
                     OAuth2Authentication authentication) {
  Map<String, Object> map = (Map<String, Object>) super.convertAccessToken(token, authentication);
  Object details = authentication.getPrincipal();
  if (details instanceof CustomUserDetails) {
origin: choerodon/choerodon-starters

public Map<String, ?> convertAccessToken(OAuth2AccessToken token,
                     OAuth2Authentication authentication) {
  Map<String, Object> map = (Map<String, Object>) super.convertAccessToken(token, authentication);
  Object details = authentication.getPrincipal();
  if (details instanceof CustomUserDetails) {
org.springframework.security.oauth2.provider.tokenDefaultAccessTokenConverterconvertAccessToken

Popular methods of DefaultAccessTokenConverter

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

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Best IntelliJ 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