Tabnine Logo
OidcReactiveOAuth2UserService.getUserInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
getUserInfo
method
in
org.springframework.security.oauth2.client.oidc.userinfo.OidcReactiveOAuth2UserService

Best Java code snippets using org.springframework.security.oauth2.client.oidc.userinfo.OidcReactiveOAuth2UserService.getUserInfo (Showing top 2 results out of 315)

origin: spring-projects/spring-security

@Override
public Mono<OidcUser> loadUser(OidcUserRequest userRequest) throws OAuth2AuthenticationException {
  Assert.notNull(userRequest, "userRequest cannot be null");
  return getUserInfo(userRequest)
    .map(userInfo -> new OidcUserAuthority(userRequest.getIdToken(), userInfo))
    .defaultIfEmpty(new OidcUserAuthority(userRequest.getIdToken(), null))
    .map(authority -> {
      OidcUserInfo userInfo = authority.getUserInfo();
      Set<GrantedAuthority> authorities = new HashSet<>();
      authorities.add(authority);
      String userNameAttributeName = userRequest.getClientRegistration()
            .getProviderDetails().getUserInfoEndpoint().getUserNameAttributeName();
      if (StringUtils.hasText(userNameAttributeName)) {
        return new DefaultOidcUser(authorities, userRequest.getIdToken(), userInfo, userNameAttributeName);
      } else {
        return new DefaultOidcUser(authorities, userRequest.getIdToken(), userInfo);
      }
    });
}
origin: apache/servicemix-bundles

@Override
public Mono<OidcUser> loadUser(OidcUserRequest userRequest) throws OAuth2AuthenticationException {
  Assert.notNull(userRequest, "userRequest cannot be null");
  return getUserInfo(userRequest)
    .map(userInfo -> new OidcUserAuthority(userRequest.getIdToken(), userInfo))
    .defaultIfEmpty(new OidcUserAuthority(userRequest.getIdToken(), null))
    .map(authority -> {
      OidcUserInfo userInfo = authority.getUserInfo();
      Set<GrantedAuthority> authorities = new HashSet<>();
      authorities.add(authority);
      String userNameAttributeName = userRequest.getClientRegistration()
            .getProviderDetails().getUserInfoEndpoint().getUserNameAttributeName();
      if (StringUtils.hasText(userNameAttributeName)) {
        return new DefaultOidcUser(authorities, userRequest.getIdToken(), userInfo, userNameAttributeName);
      } else {
        return new DefaultOidcUser(authorities, userRequest.getIdToken(), userInfo);
      }
    });
}
org.springframework.security.oauth2.client.oidc.userinfoOidcReactiveOAuth2UserServicegetUserInfo

Popular methods of OidcReactiveOAuth2UserService

  • <init>
  • loadUser
  • setOauth2UserService

Popular in Java

  • Running tasks concurrently on multiple threads
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JFileChooser (javax.swing)
  • JTextField (javax.swing)
  • 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