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

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

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

origin: spring-projects/spring-security-oauth

private AccessTokenConverter accessTokenConverter() {
  if (this.accessTokenConverter == null) {
    accessTokenConverter = new DefaultAccessTokenConverter();
  }
  return this.accessTokenConverter;
}
origin: pl.touk.widerest/widerest-api

  @Override
  public OAuth2Authentication extractAuthentication(Map<String, ?> map) {
    return super.extractAuthentication(map);
  }
}
origin: com.netflix.genie/genie-web

/**
 * The class used to covert access tokens to authentications in Spring Security.
 *
 * @param userAuthenticationConverter The user converter to use
 * @return A DefaultAccessTokenConverter with the ping federate user authentication converter class used
 */
@Bean
public DefaultAccessTokenConverter defaultAccessTokenConverter(
  @NotNull final UserAuthenticationConverter userAuthenticationConverter
) {
  final DefaultAccessTokenConverter converter = new DefaultAccessTokenConverter();
  converter.setUserTokenConverter(userAuthenticationConverter);
  return converter;
}
origin: cloudfoundry-incubator/credhub

@Bean
public JwtAccessTokenConverter jwtAccessTokenConverter() throws Exception {
 final DefaultAccessTokenConverter defaultAccessTokenConverter = new DefaultAccessTokenConverter();
 defaultAccessTokenConverter.setIncludeGrantType(true);
 final JwtAccessTokenConverter jwtAccessTokenConverter = new JwtAccessTokenConverter();
 jwtAccessTokenConverter.setAccessTokenConverter(defaultAccessTokenConverter);
 jwtAccessTokenConverter.setVerifierKey(resourceServerProperties().getJwt().getKeyValue());
 jwtAccessTokenConverter.afterPropertiesSet();
 return jwtAccessTokenConverter;
}
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: pl.touk.widerest/widerest-api

@Autowired
@Override
public void setUserTokenConverter(UserAuthenticationConverter userTokenConverter) {
  super.setUserTokenConverter(userTokenConverter);
}
origin: pl.touk.widerest/widerest-api

@Override
public OAuth2AccessToken extractAccessToken(String value, Map<String, ?> map) {
  return super.extractAccessToken(value, map);
}
origin: com.vmware.card-connectors/connectors-config

  @Override
  public OAuth2Authentication extractAuthentication(Map<String, ?> map) {
    Map<String, Object> claims = new HashMap<>();
    claims.putAll(map);
    claims.put(UserAuthenticationConverter.USERNAME, map.get("prn"));
    return super.extractAuthentication(claims);
  }
}
origin: PacktPublishing/OAuth-2.0-Cookbook

@Bean
public AccessTokenConverter accessTokenConverter() {
  DefaultAccessTokenConverter converter = new DefaultAccessTokenConverter();
  converter.setUserTokenConverter(userTokenConverter());
  return converter;
}
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: com.okta.spring/okta-spring-security-starter

@Override
public OAuth2AccessToken extractAccessToken(String value, Map<String, ?> map) {
  return super.extractAccessToken(value, tweakScopeMap(map));
}
origin: Infosys/openIDP

@Override
public OAuth2Authentication extractAuthentication(Map<String, ?> claims) {
  OAuth2Authentication authentication = super.extractAuthentication(claims);
  authentication.setDetails(claims);
  return authentication;
}
origin: org.springframework.security.oauth/spring-security-oauth2

private AccessTokenConverter accessTokenConverter() {
  if (this.accessTokenConverter == null) {
    accessTokenConverter = new DefaultAccessTokenConverter();
  }
  return this.accessTokenConverter;
}
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: com.okta.spring/okta-spring-security-starter

@Override
public OAuth2Authentication extractAuthentication(Map<String, ?> map) {
  return super.extractAuthentication(tweakScopeMap(map));
}
origin: sharmaritesh/spring-angularjs-oauth2-sample

@Bean
public DefaultAccessTokenConverter defaultAccessTokenConverter() {
  return new DefaultAccessTokenConverter();
}

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) {
origin: com.hand.hap.cloud/hap-oauth-utils

  ((Map<String, Object>)map).put("user_name",((Map<String, Object>)map).get("username"));
OAuth2Authentication authentication = super.extractAuthentication(map);
if(map.containsKey("userId")){
  CustomUserDetails user = new CustomUserDetails(authentication.getName(),
origin: sharmaritesh/spring-angularjs-oauth2-sample

@Bean
public AccessTokenConverter accessTokenConverter() {
  return new DefaultAccessTokenConverter();
}

origin: io.choerodon/choerodon-starter-core

  ((Map<String, Object>) map).put("user_name", ((Map<String, Object>) map).get("username"));
OAuth2Authentication authentication = super.extractAuthentication(map);
if (map.containsKey(USER_ID)) {
  CustomUserDetails user = new CustomUserDetails(authentication.getName(),
org.springframework.security.oauth2.provider.tokenDefaultAccessTokenConverter

Javadoc

Default implementation of AccessTokenConverter.

Most used methods

  • extractAuthentication
  • <init>
  • convertAccessToken
  • 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
  • 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