Class OAuth2CredentialSource

    • Field Detail

      • tokenEndpointUri

        private final URL tokenEndpointUri
        Deprecated.
      • scopes

        private String scopes
        Deprecated.
      • defaultKeyMaterial

        private static final char[] defaultKeyMaterial
        Deprecated.
    • Constructor Detail

      • OAuth2CredentialSource

        private OAuth2CredentialSource​(URL tokenEndpointUrl,
                                       Consumer<Map<String,​String>> authenticationHandler,
                                       String scopes,
                                       Supplier<SSLContext> sslContextSupplier,
                                       Supplier<HostnameVerifier> hostnameVerifierSupplier)
        Deprecated.
        Creates a new instance.
        Parameters:
        tokenEndpointUrl - the OAuth2 Token Endpoint URL
        authenticationHandler - a callback that can be used to push addition parameters to requests sent to the authorization server
        scopes - a string with the scope of the access request
        sslContextSupplier - a supplier from where the SSLContext is obtained in case the token endpoint is using TLS/HTTPS
        hostnameVerifierSupplier - a supplier from where the HostnameVerifier is obtained in case the token endpoint is using TLS/HTTPS
    • Method Detail

      • getCredentialAcquireSupport

        public SupportLevel getCredentialAcquireSupport​(Class<? extends Credential> credentialType,
                                                        String algorithmName,
                                                        AlgorithmParameterSpec parameterSpec)
                                                 throws IOException
        Deprecated.
        Description copied from interface: CredentialSource
        Determine whether a given credential is definitely obtainable, possibly obtainable, or definitely not obtainable.
        Specified by:
        getCredentialAcquireSupport in interface CredentialSource
        Parameters:
        credentialType - the credential type class (must not be null)
        algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type does not support algorithm names
        parameterSpec - the algorithm parameters to match, or null if any parameters are acceptable or the credential type does not support algorithm parameters
        Returns:
        the level of support for this credential type (not null)
        Throws:
        IOException - if the credential source failed to determine the support level
      • getCredential

        public <C extends Credential> C getCredential​(Class<C> credentialType,
                                                      String algorithmName,
                                                      AlgorithmParameterSpec parameterSpec)
                                               throws IOException
        Deprecated.
        Description copied from interface: CredentialSource
        Acquire a credential of the given type. The credential type is defined by its Class and an optional algorithmName. If the algorithm name is not given, then the query is performed for any algorithm of the given type.
        Specified by:
        getCredential in interface CredentialSource
        Type Parameters:
        C - the credential type
        Parameters:
        credentialType - the credential type class (must not be null)
        algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type does not support algorithm names
        parameterSpec - the algorithm parameters to match, or null if any parameters are acceptable or the credential type does not support algorithm parameters
        Returns:
        the credential, or null if the principal has no credential of that type
        Throws:
        IOException - if the realm is not able to handle requests for any reason
      • resolveSSLContext

        private SSLContext resolveSSLContext()
        Deprecated.
      • buildParameters

        private byte[] buildParameters​(Map<String,​String> parameters)
        Deprecated.
      • isHttps

        private boolean isHttps​(URL tokenEndpointUrl)
        Deprecated.