Codota Logo
ClientRegistrationException.getMessage
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • String (java.lang)
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now