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

How to use
VerificationException
in
org.keycloak

Best Java code snippets using org.keycloak.VerificationException (Showing top 3 results out of 315)

origin: liveoak-io/liveoak

private AccessToken parseToken(String tokenString) throws VerificationException {
  JWSInput input = new JWSInput(tokenString);
  AccessToken token;
  try {
    token = input.readJsonContent(AccessToken.class);
  } catch (IOException e) {
    throw new VerificationException(e);
  }
  PublicKey publicKey;
  try {
    publicKey = config.getPublicKey(token.getAudience());
  } catch (Exception e) {
    throw new VerificationException("Failed to get public key", e);
  }
  boolean verified = false;
  try {
    verified = RSAProvider.verify(input, publicKey);
  } catch (Exception ignore) {
  }
  if (!verified) throw new VerificationException("Token signature not validated");
  if (token.getSubject() == null) {
    throw new VerificationException("Token user was null");
  }
  if (!token.isActive()) {
    throw new VerificationException("Token is not active.");
  }
  return token;
}
origin: eu.agrosense.api/session

throw new VerificationException("Invalid state");
origin: eu.agrosense.api/session

private void parseAccessToken(AccessTokenResponse tokenResponse) throws VerificationException {
  tokenString = tokenResponse.getToken();
  refreshToken = tokenResponse.getRefreshToken();
  idTokenString = tokenResponse.getIdToken();
  token = RSATokenVerifier.verifyToken(tokenString, deployment.getRealmKey(), deployment.getRealm());
  if (idTokenString != null) {
    JWSInput input = new JWSInput(idTokenString);
    try {
      idToken = input.readJsonContent(IDToken.class);
    } catch (IOException e) {
      throw new VerificationException();
    }
  }
}
org.keycloakVerificationException

Most used methods

  • <init>

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Path (java.nio.file)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Top Vim 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