Codota Logo
ResourceRetriever.retrieveResource
Code IndexAdd Codota to your IDE (free)

How to use
retrieveResource
method
in
com.nimbusds.jose.util.ResourceRetriever

Best Java code snippets using com.nimbusds.jose.util.ResourceRetriever.retrieveResource (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: de.adorsys.sts/sts-resource-server

  private JWKSet retrieveJwkSet(String endpointUrl) {
    Resource res;
    try {
      res = resourceRetriever.retrieveResource(new URL(endpointUrl));
    } catch (IOException e) {
      throw new IllegalStateException("Couldn't retrieve remote jwk set from: " + endpointUrl, e);
    }

    try {
      JWKSet.parse(res.getContent());
      return JWKSet.parse(res.getContent());
    } catch (java.text.ParseException e) {
      throw new IllegalStateException(e);
    }
  }
}
origin: de.adorsys.sts/sts-resource-server

  res = resourceRetriever.retrieveResource(new URL(resourceServer.getEndpointUrl()));
} catch (IOException e) {
  throw new IllegalStateException("Couldn't retrieve remote metadata: " + e.getMessage(), e);
origin: com.nimbusds/nimbus-jose-jwt

/**
 * Updates the cached JWK set from the configured URL.
 *
 * @return The updated JWK set.
 *
 * @throws RemoteKeySourceException If JWK retrieval failed.
 */
private JWKSet updateJWKSetFromURL()
  throws RemoteKeySourceException {
  Resource res;
  try {
    res = jwkSetRetriever.retrieveResource(jwkSetURL);
  } catch (IOException e) {
    throw new RemoteKeySourceException("Couldn't retrieve remote JWK set: " + e.getMessage(), e);
  }
  JWKSet jwkSet;
  try {
    jwkSet = JWKSet.parse(res.getContent());
  } catch (java.text.ParseException e) {
    throw new RemoteKeySourceException("Couldn't parse remote JWK set: " + e.getMessage(), e);
  }
  jwkSetCache.put(jwkSet);
  return jwkSet;
}
origin: org.pac4j/pac4j-oidc

@Override
protected void internalInit() {
  // checks
  CommonHelper.assertNotBlank("clientId", getClientId());
  if (!AUTHORIZATION_CODE_FLOWS.contains(responseType) && !IMPLICIT_FLOWS.contains(responseType)
    && !HYBRID_CODE_FLOWS.contains(responseType)) {
    throw new TechnicalException("Unsupported responseType: " + responseType);
  }
  // except for the implicit flow, the secret is mandatory
  if (!IMPLICIT_FLOWS.contains(responseType)) {
    CommonHelper.assertNotBlank("secret", getSecret());
  }
  if (this.getDiscoveryURI() == null && this.getProviderMetadata() == null) {
    throw new TechnicalException("You must define either the discovery URL or directly the provider metadata");
  }
  // default value
  if (getResourceRetriever() == null) {
    setResourceRetriever(new DefaultResourceRetriever(getConnectTimeout(),getReadTimeout()));
  }
  if (this.getProviderMetadata() == null) {
    CommonHelper.assertNotBlank("discoveryURI", getDiscoveryURI());
    try {
      // Download OIDC metadata
      this.setProviderMetadata(OIDCProviderMetadata.parse(getResourceRetriever().retrieveResource(
          new URL(this.getDiscoveryURI())).getContent()));
    } catch (final IOException | ParseException e) {
      throw new TechnicalException(e);
    }
  }
}
com.nimbusds.jose.utilResourceRetrieverretrieveResource

Javadoc

Retrieves the resource from the specified HTTP(S) URL.

Popular methods of ResourceRetriever

    Popular in Java

    • Start an intent from android
    • getResourceAsStream (ClassLoader)
    • scheduleAtFixedRate (Timer)
      Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
    • setScale (BigDecimal)
      Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
    • Socket (java.net)
      Provides a client-side TCP socket.
    • SortedSet (java.util)
      A Set that further provides a total ordering on its elements. The elements are ordered using their C
    • TreeMap (java.util)
      A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
    • TimeUnit (java.util.concurrent)
      A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
    • JList (javax.swing)
    • Logger (org.slf4j)
      The main user interface to logging. It is expected that logging takes place through concrete impleme
    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