congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ClientRegistrationException.getMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
getMessage
method
in
org.springframework.security.oauth2.provider.ClientRegistrationException

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

origin: cloudfoundry/uaa

@Override
protected void doFilterInternal(HttpServletRequest request,
    HttpServletResponse response, FilterChain chain)
        throws IOException, ServletException {
  try{
    String header = request.getHeader("Authorization");
    if (header == null || !header.startsWith("Basic ")) {
      chain.doFilter(request, response);
      return;
    }
    String[] decodedHeader = extractAndDecodeHeader(header, request);
    //Validate against client lockout policy
    String clientId = decodedHeader[0];
    //Validate against client secret expiration in the zone configured client secret policy
    Timestamp lastModified = (Timestamp) clientDetailsService.loadClientByClientId(clientId).getAdditionalInformation().get(ClientConstants.LAST_MODIFIED);
  } catch(BadCredentialsException e) {
    super.getAuthenticationEntryPoint().commence(request, response, e);
    return;
  } catch(ClientRegistrationException e) {
    logger.debug(e.getMessage());
  }
  //call parent class to authenticate
  super.doFilterInternal(request, response, chain);
}
origin: dhis2/dhis2-core

  @Override
  public UserDetails loadUserByUsername( String username ) throws UsernameNotFoundException
  {
    try
    {
      return super.loadUserByUsername( username );
    }
    catch ( ClientRegistrationException ex )
    {
      throw new UsernameNotFoundException( ex.getMessage(), ex );
    }
  }
}
origin: entando/entando-core

public void testLoadClientByInvalidClientId() {
  try {
    this.oauthConsumerManager.loadClientByClientId("invalid");
    fail();
  } catch (ClientRegistrationException t) {
    assertEquals("Client with id 'invalid' does not exists", t.getMessage());
  } catch (Throwable t) {
    throw t;
  }
}
origin: entando/entando-core

public void testFailLoadClientByClientId() throws Throwable {
  ConsumerRecordVO consumer = this.createConsumer("key_3", "secret_3", true);
  try {
    assertNull(this.oauthConsumerManager.getConsumerRecord(consumer.getKey()));
    oauthConsumerManager.addConsumer(consumer);
    ConsumerRecordVO extractedConsumer = oauthConsumerManager.getConsumerRecord(consumer.getKey());
    assertNotNull(extractedConsumer);
    this.oauthConsumerManager.loadClientByClientId("key_3");
    fail();
  } catch (ClientRegistrationException t) {
    assertEquals("Client 'key_3' is expired", t.getMessage());
  } catch (Throwable t) {
    throw t;
  } finally {
    oauthConsumerManager.deleteConsumer(consumer.getKey());
    assertNull(this.oauthConsumerManager.getConsumerRecord(consumer.getKey()));
  }
}
org.springframework.security.oauth2.providerClientRegistrationExceptiongetMessage

Popular methods of ClientRegistrationException

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Permission (java.security)
    Legacy security code; do not use.
  • Collectors (java.util.stream)
  • JComboBox (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 15 Vim Plugins
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