public class CredentialStoreURIParser extends Object
Credential Store URI is used for configuring/referencing credential stores. It can specify complete information about credential store including parameters as well as reference of stored secured credentials (such as passwords).
crStoreURI = scheme://store_name [/storage_file] [?query] [#attribute_name] scheme = cr-store store_name =//alpha *alphanum storage_file = file_name_uri query = store_parameter = value *[;store_parameter = value] store_parameter = alpha *alphanum value ='alpha *alphanum'|alpha *alphanum attribute_name = alpha *alphanum
Credential Store URI has to be absolute with store_name> always defined.
parameters to {@link org.wildfly.security.credential.store.CredentialStoreSpi} implementation are supplied
through query part of URI. In case they need to decode binary value Base64 encoding method should be used.
| Modifier and Type | Field and Description |
|---|---|
static String |
CR_STORE_SCHEME
Credential Store URI scheme name ("cr-store").
|
| Constructor and Description |
|---|
CredentialStoreURIParser(String uri)
Creates
CredentialStoreURIParser based on given URI |
CredentialStoreURIParser(URI uri)
Creates
CredentialStoreURIParser based on given URI |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute()
Returns attribute specified by parsed Credential Store URI
|
String |
getName()
Returns parsed credential store name.
|
Map<String,String> |
getOptionsMap()
Returns new
Map<String, Object> for use in {@link org.wildfly.security.credential.store.CredentialStoreSpi}
to initialize it. |
String |
getParameter(String param)
Fetch parameter value from query string.
|
Set<String> |
getParameters()
Returns
Set<String> of parameters specified by the parsed Credential Store URI. |
String |
getScheme()
Returns scheme handled by this parser.
|
String |
getStorageFile()
If storage file was not specified by the Credential Store URI returns
null |
static String |
safeCRStoreURI(String uri)
Transforms given parameter to safely displayed
String by stripping potentially sensitive information from the URI. |
public static final String CR_STORE_SCHEME
public CredentialStoreURIParser(String uri) throws URISyntaxException
CredentialStoreURIParser based on given URIuri - URI to parseURISyntaxException - in case of problems parsing given URIpublic CredentialStoreURIParser(URI uri)
CredentialStoreURIParser based on given URIuri - URI to parsepublic String getName()
public String getScheme()
CR_STORE_SCHEME)public static String safeCRStoreURI(String uri)
String by stripping potentially sensitive information from the URI.uri - original URI stringString safe to displaypublic String getStorageFile()
nullStringpublic String getAttribute()
nullpublic String getParameter(String param)
param - name of wanted parameterString or null if parameter was not specified in query part of the URIpublic Set<String> getParameters()
Set<String> of parameters specified by the parsed Credential Store URI.Copyright © 2017 JBoss by Red Hat. All rights reserved.