Package org.wildfly.security.auth.client
Class ElytronXmlParser
- java.lang.Object
-
- org.wildfly.security.auth.client.ElytronXmlParser
-
public final class ElytronXmlParser extends Object
A parser for the Elytron XML schema.- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ElytronXmlParser.AbstractLoadingKeyStoreFactory
(package private) static class
ElytronXmlParser.DeferredSupplier<T>
(package private) static class
ElytronXmlParser.FileLoadingKeyStoreFactory
(package private) static class
ElytronXmlParser.KeyStoreCreateFactory
(package private) static class
ElytronXmlParser.NullLoadingKeyStoreFactory
(package private) static class
ElytronXmlParser.PasswordKeyStoreFactory
(package private) static class
ElytronXmlParser.ResourceLoadingKeyStoreFactory
private static class
ElytronXmlParser.TrustManagerBuilder
(package private) static class
ElytronXmlParser.UnknownTypeFileKeyStoreFactory
(package private) static class
ElytronXmlParser.URILoadingKeyStoreFactory
private static class
ElytronXmlParser.Version
-
Field Summary
Fields Modifier and Type Field Description private static Supplier<Provider[]>
DEFAULT_PROVIDER_SUPPLIER
private static Supplier<Provider[]>
ELYTRON_PROVIDER_SUPPLIER
(package private) static Map<String,ElytronXmlParser.Version>
KNOWN_NAMESPACES
-
Constructor Summary
Constructors Modifier Constructor Description private
ElytronXmlParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static String
aliasesToString(Enumeration<String> aliases)
private static <T,E extends Exception>
org.wildfly.common.function.ExceptionUnaryOperator<T,E>andThenOp(org.wildfly.common.function.ExceptionUnaryOperator<T,E> first, org.wildfly.common.function.ExceptionUnaryOperator<T,E> second)
private static void
checkAttributeNamespace(org.wildfly.client.config.ConfigurationXMLStreamReader reader, int idx)
private static void
checkElementNamespace(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
private static String
checkGetElementNamespace(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
private static org.wildfly.client.config.ConfigXMLParseException
invalidPortNumber(org.wildfly.client.config.ConfigurationXMLStreamReader reader, int index)
private static boolean
isSet(int var, int bit)
private static char[]
keyStoreCredentialToPassword(org.wildfly.common.function.ExceptionSupplier<KeyStore.Entry,org.wildfly.client.config.ConfigXMLParseException> keyStoreCredential, Supplier<Provider[]> providers)
private static org.wildfly.client.config.ConfigXMLParseException
missingAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String name)
private static String
namespacesToString()
(package private) static MatchRule
parseAbstractMatchRuleType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
Parse the XML match-rule group.private static void
parseAttributesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,String> attributesMap)
Parse attributesattributes-type
from an XML reader.private static void
parseAttributeType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,String> attributesMap)
Parse an attributeattribute-type
from an XML reader.static SecurityFactory<AuthenticationContext>
parseAuthenticationClientConfiguration()
Parse an Elytron authentication client configuration from a configuration discovered using the default wildfly-client-config discovery rules.static SecurityFactory<AuthenticationContext>
parseAuthenticationClientConfiguration(URI uri)
Parse an Elytron authentication client configuration from a resource located at a specifiedURI
.(package private) static SecurityFactory<AuthenticationContext>
parseAuthenticationClientConfiguration(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse a Elytron authentication client configuration from a configuration XML reader.(package private) static SecurityFactory<AuthenticationContext>
parseAuthenticationClientType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
Parse an XML element of typeauthentication-client-type
from an XML reader.private static void
parseAuthenticationConfigurationsType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<AuthenticationConfiguration,org.wildfly.client.config.ConfigXMLParseException>> authenticationConfigurationsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
(package private) static void
parseAuthenticationConfigurationType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<AuthenticationConfiguration,org.wildfly.client.config.ConfigXMLParseException>> authenticationConfigurationsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
(package private) static org.wildfly.common.function.ExceptionUnaryOperator<RuleNode<AuthenticationConfiguration>,org.wildfly.client.config.ConfigXMLParseException>
parseAuthenticationRuleType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<AuthenticationConfiguration,org.wildfly.client.config.ConfigXMLParseException>> authenticationConfigurationsMap)
(package private) static BearerTokenCredential
parseBearerTokenType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typebearer-token-type
from an XML reader.private static void
parseCertificateRevocationList(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, ElytronXmlParser.Version xmlVersion, boolean multipleCrls)
private static void
parseCertificateRevocationLists(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, ElytronXmlParser.Version xmlVersion)
private static X509CertificateChainPrivateCredential
parseCertificateType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
(package private) static CipherSuiteSelector
parseCipherSuiteSelectorType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
Parse an XML element of typessl-cipher-selector-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<Password,org.wildfly.client.config.ConfigXMLParseException>
parseClearPassword(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Supplier<Provider[]> providers)
Parse an XML element of typeclear-password-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException>
parseCredentialStoreRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap)
private static void
parseCredentialStoresType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
Parse an XML element of typecredential-stores-type
from an XML reader.private static void
parseCredentialStoreType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
Parse an XML element of typecredential-store-type
from an XML reader.private static org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException>
parseCredentialsType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
(package private) static void
parseEmptyType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typeempty-type
from an XML reader.private static KeyPairCredential
parseKeyPair(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
(package private) static org.wildfly.common.function.ExceptionSupplier<KeyStore.Entry,org.wildfly.client.config.ConfigXMLParseException>
parseKeyStoreRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
Parse an XML element of typekey-store-ref-type
from an XML reader.private static org.wildfly.common.function.ExceptionSupplier<X509ExtendedKeyManager,org.wildfly.client.config.ConfigXMLParseException>
parseKeyStoreSslCertificate(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
(package private) static void
parseKeyStoresType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
Parse an XML element of typekey-stores-type
from an XML reader.(package private) static void
parseKeyStoreType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
Parse an XML element of typekey-store-type
from an XML reader.private static SecurityFactory<AuthenticationContext>
parseLegacyConfiguration()
(package private) static CredentialSource
parseLocalKerberos(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typelocal-kerberos-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<Password,org.wildfly.client.config.ConfigXMLParseException>
parseMaskedPassword(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Supplier<Provider[]> providers)
Parse an XML element of typemasked-password-type
from an XML reader.private static MatchRule
parseMatchAbstractType(MatchRule rule, org.wildfly.client.config.ConfigurationXMLStreamReader reader)
(package private) static String
parseModuleRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typemodule-ref-type
from an XML reader.private static <P> P[]
parseMultiPem(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Class<P> pemType, IntFunction<P[]> ctor)
(package private) static String[]
parseNamesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typenames-type
from an XML reader.(package private) static String
parseNameType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typename-type
from an XML reader.(package private) static String
parseNameType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, boolean optional)
Parse an XML element of typename-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException>
parseOAuth2BearerTokenType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, ElytronXmlParser.Version xmlVersion)
Parse an XML element of typeoauth2-bearer-token-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException>
parseOAuth2ClientCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, ElytronXmlParser.Version xmlVersion)
Parse an XML element of typeoauth2-client-credentials-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException>
parseOAuth2MaskedClientCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, ElytronXmlParser.Version xmlVersion, Supplier<Provider[]> providers)
Parse an XML element of typeoauth2-client-credentials-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException>
parseOAuth2MaskedResourceOwnerCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, ElytronXmlParser.Version xmlVersion, Supplier<Provider[]> providers)
Parse an XML element of typeoauth2-bearer-token-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException>
parseOAuth2ResourceOwnerCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, ElytronXmlParser.Version xmlVersion)
Parse an XML element of typeoauth2-bearer-token-type
from an XML reader.private static void
parseOcsp(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap)
private static KeyPair
parseOpenSSHKeyType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
private static <P> P
parsePem(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Class<P> pemType)
(package private) static int
parsePortType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typeport-type
from an XML reader.(package private) static Map<String,String>
parsePropertiesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
(package private) static ProtocolSelector
parseProtocolSelectorNamesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typenames
which yields a protocol selector from an XML reader.(package private) static Supplier<Provider[]>
parseProvidersType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
(package private) static NameRewriter
parseRegexSubstitutionType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typeregex-substitution-type
from an XML reader.(package private) static org.wildfly.common.function.ExceptionSupplier<InputStream,IOException>
parseResourceType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
Parse an XML element of typeresource-type
from an XML reader.(package private) static <C> org.wildfly.common.function.ExceptionSupplier<RuleNode<C>,org.wildfly.client.config.ConfigXMLParseException>
parseRulesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<C,org.wildfly.client.config.ConfigXMLParseException>> configurations, org.wildfly.common.function.ExceptionBiFunction<org.wildfly.client.config.ConfigurationXMLStreamReader,Map<String,org.wildfly.common.function.ExceptionSupplier<C,org.wildfly.client.config.ConfigXMLParseException>>,org.wildfly.common.function.ExceptionUnaryOperator<RuleNode<C>,org.wildfly.client.config.ConfigXMLParseException>,org.wildfly.client.config.ConfigXMLParseException> ruleParseFunction)
(package private) static SaslMechanismSelector
parseSaslMechanismSelectorType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
private static SSHCredential
parseSSHKeyLocationCredential(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
(package private) static org.wildfly.common.function.ExceptionUnaryOperator<RuleNode<SecurityFactory<SSLContext>>,org.wildfly.client.config.ConfigXMLParseException>
parseSslContextRuleType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<SecurityFactory<SSLContext>,org.wildfly.client.config.ConfigXMLParseException>> sslContextsMap)
private static void
parseSslContextsType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<SecurityFactory<SSLContext>,org.wildfly.client.config.ConfigXMLParseException>> sslContextsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
private static void
parseSslContextType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<SecurityFactory<SSLContext>,org.wildfly.client.config.ConfigXMLParseException>> sslContextsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers)
private static void
parseTrustManager(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, ElytronXmlParser.Version xmlVersion)
(package private) static org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>
parseTrustStoreRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap)
Parse an XML element of typetrust-store-ref-type
from an XML reader.(package private) static URI
parseUriType(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
Parse an XML element of typeuri-type
from an XML reader.(package private) static Map<String,?>
parseWebServicesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion)
private static void
requireNoAttributes(org.wildfly.client.config.ConfigurationXMLStreamReader reader)
private static String
requireSingleAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String attributeName)
private static <A> A
requireSingleAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String attributeName, org.wildfly.common.function.ExceptionSupplier<A,org.wildfly.client.config.ConfigXMLParseException> attributeFunction)
private static URI
requireSingleURIAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String attributeName)
private static int
setBit(int var, int bit)
-
-
-
Method Detail
-
parseAuthenticationClientConfiguration
public static SecurityFactory<AuthenticationContext> parseAuthenticationClientConfiguration() throws org.wildfly.client.config.ConfigXMLParseException
Parse an Elytron authentication client configuration from a configuration discovered using the default wildfly-client-config discovery rules.- Returns:
- the authentication context factory
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseAuthenticationClientConfiguration
public static SecurityFactory<AuthenticationContext> parseAuthenticationClientConfiguration(URI uri) throws org.wildfly.client.config.ConfigXMLParseException
Parse an Elytron authentication client configuration from a resource located at a specifiedURI
.- Parameters:
uri
- theURI
of the configuration.- Returns:
- the authentication context factory
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
namespacesToString
private static String namespacesToString()
-
parseAuthenticationClientConfiguration
static SecurityFactory<AuthenticationContext> parseAuthenticationClientConfiguration(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse a Elytron authentication client configuration from a configuration XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the authentication context factory
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseLegacyConfiguration
private static SecurityFactory<AuthenticationContext> parseLegacyConfiguration()
-
parseAuthenticationClientType
static SecurityFactory<AuthenticationContext> parseAuthenticationClientType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeauthentication-client-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of parsed XML- Returns:
- the authentication context factory
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseAuthenticationConfigurationsType
private static void parseAuthenticationConfigurationsType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<AuthenticationConfiguration,org.wildfly.client.config.ConfigXMLParseException>> authenticationConfigurationsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseSslContextsType
private static void parseSslContextsType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<SecurityFactory<SSLContext>,org.wildfly.client.config.ConfigXMLParseException>> sslContextsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseSslContextType
private static void parseSslContextType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<SecurityFactory<SSLContext>,org.wildfly.client.config.ConfigXMLParseException>> sslContextsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseCertificateRevocationLists
private static void parseCertificateRevocationLists(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseCertificateRevocationList
private static void parseCertificateRevocationList(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, ElytronXmlParser.Version xmlVersion, boolean multipleCrls) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseOcsp
private static void parseOcsp(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseKeyStoreSslCertificate
private static org.wildfly.common.function.ExceptionSupplier<X509ExtendedKeyManager,org.wildfly.client.config.ConfigXMLParseException> parseKeyStoreSslCertificate(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
aliasesToString
private static String aliasesToString(Enumeration<String> aliases)
-
parseTrustManager
private static void parseTrustManager(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.TrustManagerBuilder builder, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseSslContextRuleType
static org.wildfly.common.function.ExceptionUnaryOperator<RuleNode<SecurityFactory<SSLContext>>,org.wildfly.client.config.ConfigXMLParseException> parseSslContextRuleType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<SecurityFactory<SSLContext>,org.wildfly.client.config.ConfigXMLParseException>> sslContextsMap) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseAuthenticationRuleType
static org.wildfly.common.function.ExceptionUnaryOperator<RuleNode<AuthenticationConfiguration>,org.wildfly.client.config.ConfigXMLParseException> parseAuthenticationRuleType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<AuthenticationConfiguration,org.wildfly.client.config.ConfigXMLParseException>> authenticationConfigurationsMap) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseRulesType
static <C> org.wildfly.common.function.ExceptionSupplier<RuleNode<C>,org.wildfly.client.config.ConfigXMLParseException> parseRulesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<C,org.wildfly.client.config.ConfigXMLParseException>> configurations, org.wildfly.common.function.ExceptionBiFunction<org.wildfly.client.config.ConfigurationXMLStreamReader,Map<String,org.wildfly.common.function.ExceptionSupplier<C,org.wildfly.client.config.ConfigXMLParseException>>,org.wildfly.common.function.ExceptionUnaryOperator<RuleNode<C>,org.wildfly.client.config.ConfigXMLParseException>,org.wildfly.client.config.ConfigXMLParseException> ruleParseFunction) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseAuthenticationConfigurationType
static void parseAuthenticationConfigurationType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<AuthenticationConfiguration,org.wildfly.client.config.ConfigXMLParseException>> authenticationConfigurationsMap, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseProvidersType
static Supplier<Provider[]> parseProvidersType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseWebServicesType
static Map<String,?> parseWebServicesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseAbstractMatchRuleType
static MatchRule parseAbstractMatchRuleType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
Parse the XML match-rule group. On return, the reader will be positioned either at a start tag for an element that is not included in this group, or at an end tag.- Parameters:
reader
- the XML readerxmlVersion
- the version of parsed XML- Returns:
- the parsed match rule
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseMatchAbstractType
private static MatchRule parseMatchAbstractType(MatchRule rule, org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
isSet
private static boolean isSet(int var, int bit)
-
setBit
private static int setBit(int var, int bit)
-
andThenOp
private static <T,E extends Exception> org.wildfly.common.function.ExceptionUnaryOperator<T,E> andThenOp(org.wildfly.common.function.ExceptionUnaryOperator<T,E> first, org.wildfly.common.function.ExceptionUnaryOperator<T,E> second)
-
parseCredentialsType
private static org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException> parseCredentialsType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseSSHKeyLocationCredential
private static SSHCredential parseSSHKeyLocationCredential(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseKeyPair
private static KeyPairCredential parseKeyPair(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseOpenSSHKeyType
private static KeyPair parseOpenSSHKeyType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseCertificateType
private static X509CertificateChainPrivateCredential parseCertificateType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseMultiPem
private static <P> P[] parseMultiPem(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Class<P> pemType, IntFunction<P[]> ctor) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parsePem
private static <P> P parsePem(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Class<P> pemType) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseKeyStoresType
static void parseKeyStoresType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typekey-stores-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of parsed XMLkeyStoresMap
- the map of key stores to use- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseKeyStoreType
static void parseKeyStoreType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typekey-store-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of parsed XMLkeyStoresMap
- the map of key stores to use- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseKeyStoreRefType
static org.wildfly.common.function.ExceptionSupplier<KeyStore.Entry,org.wildfly.client.config.ConfigXMLParseException> parseKeyStoreRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typekey-store-ref-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of parsed XMLkeyStoresMap
- the map of key stores to usecredentialStoresMap
- the map of credential stores to useproviders
- supplier of providers for loading services- Returns:
- the key store entry factory
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
keyStoreCredentialToPassword
private static char[] keyStoreCredentialToPassword(org.wildfly.common.function.ExceptionSupplier<KeyStore.Entry,org.wildfly.client.config.ConfigXMLParseException> keyStoreCredential, Supplier<Provider[]> providers) throws GeneralSecurityException, org.wildfly.client.config.ConfigXMLParseException
- Throws:
GeneralSecurityException
org.wildfly.client.config.ConfigXMLParseException
-
parseTrustStoreRefType
static org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException> parseTrustStoreRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typetrust-store-ref-type
from an XML reader.- Parameters:
reader
- the XML stream readerkeyStoresMap
- the map of key stores to use- Returns:
- the key store entry factory
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseCredentialStoreRefType
static org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException> parseCredentialStoreRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseCredentialStoresType
private static void parseCredentialStoresType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typecredential-stores-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of parsed XMLkeyStoresMap
- the key stores mapcredentialStoresMap
- the map of credential stores to use @throws ConfigXMLParseException if the resource failed to be parsed- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseCredentialStoreType
private static void parseCredentialStoreType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,org.wildfly.common.function.ExceptionSupplier<KeyStore,org.wildfly.client.config.ConfigXMLParseException>> keyStoresMap, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typecredential-store-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of parsed XMLkeyStoresMap
- the key stores mapcredentialStoresMap
- the map of credential stores to fill @throws ConfigXMLParseException if the resource failed to be parsed- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseAttributesType
private static void parseAttributesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion, Map<String,String> attributesMap) throws org.wildfly.client.config.ConfigXMLParseException
Parse attributesattributes-type
from an XML reader.- Parameters:
reader
- the XML stream readerattributesMap
- the map to put attributes to.- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseAttributeType
private static void parseAttributeType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,String> attributesMap) throws org.wildfly.client.config.ConfigXMLParseException
Parse an attributeattribute-type
from an XML reader.- Parameters:
reader
- the XML stream readerattributesMap
- the map to put attributes to.- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseEmptyType
static void parseEmptyType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeempty-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseNameType
static String parseNameType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typename-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the parsed name
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseNameType
static String parseNameType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, boolean optional) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typename-type
from an XML reader.- Parameters:
reader
- the XML stream readeroptional
- is the name attribute optional?- Returns:
- the parsed name
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseResourceType
static org.wildfly.common.function.ExceptionSupplier<InputStream,IOException> parseResourceType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeresource-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of the XML being parsed- Returns:
- An
ExceptionSupplier<InputStream, IOException>
for the referenced resource - Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parsePortType
static int parsePortType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeport-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the port number (1-65535 inclusive)
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseRegexSubstitutionType
static NameRewriter parseRegexSubstitutionType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeregex-substitution-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the regular expression based name rewriter
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseNamesType
static String[] parseNamesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typenames-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the array of parsed names
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseUriType
static URI parseUriType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeuri-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the parsed URI
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseSaslMechanismSelectorType
static SaslMechanismSelector parseSaslMechanismSelectorType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseCipherSuiteSelectorType
static CipherSuiteSelector parseCipherSuiteSelectorType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typessl-cipher-selector-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the parsed cipher suite selector
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseProtocolSelectorNamesType
static ProtocolSelector parseProtocolSelectorNamesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typenames
which yields a protocol selector from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the parsed protocol selector
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseModuleRefType
static String parseModuleRefType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typemodule-ref-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the corresponding module name
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed or the module is not found
-
parseClearPassword
static org.wildfly.common.function.ExceptionSupplier<Password,org.wildfly.client.config.ConfigXMLParseException> parseClearPassword(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeclear-password-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the clear password characters
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed or the module is not found
-
parseMaskedPassword
static org.wildfly.common.function.ExceptionSupplier<Password,org.wildfly.client.config.ConfigXMLParseException> parseMaskedPassword(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typemasked-password-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- a
MaskedPassword
supplier - Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed or the module is not found
-
parsePropertiesType
static Map<String,String> parsePropertiesType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
parseBearerTokenType
static BearerTokenCredential parseBearerTokenType(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typebearer-token-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseOAuth2BearerTokenType
static org.wildfly.common.function.ExceptionSupplier<CredentialSource,org.wildfly.client.config.ConfigXMLParseException> parseOAuth2BearerTokenType(org.wildfly.client.config.ConfigurationXMLStreamReader reader, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeoauth2-bearer-token-type
from an XML reader.- Parameters:
reader
- the XML stream readerxmlVersion
- the version of parsed XML- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseOAuth2ResourceOwnerCredentials
static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> parseOAuth2ResourceOwnerCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeoauth2-bearer-token-type
from an XML reader.- Parameters:
reader
- the XML stream readerbuilderSupplier
- the builder supplier- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseOAuth2ClientCredentials
static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> parseOAuth2ClientCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, Map<String,org.wildfly.common.function.ExceptionSupplier<CredentialStore,org.wildfly.client.config.ConfigXMLParseException>> credentialStoresMap, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeoauth2-client-credentials-type
from an XML reader.- Parameters:
reader
- the XML stream readerbuilderSupplier
- the builder supplier- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseOAuth2MaskedResourceOwnerCredentials
static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> parseOAuth2MaskedResourceOwnerCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, ElytronXmlParser.Version xmlVersion, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeoauth2-bearer-token-type
from an XML reader.- Parameters:
reader
- the XML stream readerbuilderSupplier
- the builder supplier- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseOAuth2MaskedClientCredentials
static org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> parseOAuth2MaskedClientCredentials(org.wildfly.client.config.ConfigurationXMLStreamReader reader, org.wildfly.common.function.ExceptionSupplier<OAuth2CredentialSource.Builder,org.wildfly.client.config.ConfigXMLParseException> builderSupplier, ElytronXmlParser.Version xmlVersion, Supplier<Provider[]> providers) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typeoauth2-client-credentials-type
from an XML reader.- Parameters:
reader
- the XML stream readerbuilderSupplier
- the builder supplier- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed
-
parseLocalKerberos
static CredentialSource parseLocalKerberos(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
Parse an XML element of typelocal-kerberos-type
from an XML reader.- Parameters:
reader
- the XML stream reader- Returns:
- the clear password characters
- Throws:
org.wildfly.client.config.ConfigXMLParseException
- if the resource failed to be parsed or the module is not found
-
checkGetElementNamespace
private static String checkGetElementNamespace(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
checkElementNamespace
private static void checkElementNamespace(org.wildfly.client.config.ConfigurationXMLStreamReader reader, ElytronXmlParser.Version xmlVersion) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
checkAttributeNamespace
private static void checkAttributeNamespace(org.wildfly.client.config.ConfigurationXMLStreamReader reader, int idx) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
requireNoAttributes
private static void requireNoAttributes(org.wildfly.client.config.ConfigurationXMLStreamReader reader) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
requireSingleAttribute
private static String requireSingleAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String attributeName) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
requireSingleURIAttribute
private static URI requireSingleURIAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String attributeName) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
requireSingleAttribute
private static <A> A requireSingleAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String attributeName, org.wildfly.common.function.ExceptionSupplier<A,org.wildfly.client.config.ConfigXMLParseException> attributeFunction) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
missingAttribute
private static org.wildfly.client.config.ConfigXMLParseException missingAttribute(org.wildfly.client.config.ConfigurationXMLStreamReader reader, String name)
-
invalidPortNumber
private static org.wildfly.client.config.ConfigXMLParseException invalidPortNumber(org.wildfly.client.config.ConfigurationXMLStreamReader reader, int index) throws org.wildfly.client.config.ConfigXMLParseException
- Throws:
org.wildfly.client.config.ConfigXMLParseException
-
-