Package org.wildfly.security.auth.realm
Class FileSystemSecurityRealmBuilder
java.lang.Object
org.wildfly.security.auth.realm.FileSystemSecurityRealmBuilder
A builder class that creates
FileSystemSecurityRealm instances.- Author:
- Ashpan Raskar
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newFileSystemSecurityRealminstance based on configuration defined for thisFileSystemSecurityRealmBuilderinstance.setEncoded(boolean encoded) Set whether the identity name should be encoded for the filename in the realm.setHashCharset(Charset hashCharset) Set the character set to be used by the realm.setHashEncoding(Encoding hashEncoding) Set the string format for hashed passwords to be used by the realm.setLevels(int levels) Set the number of levels to be used by the realm.setNameRewriter(NameRewriter nameRewriter) Set the name rewriter to be used by the realm.setPrivateKey(PrivateKey privateKey) Set the PrivateKey to be used by the realm.setProviders(Supplier<Provider[]> providers) Set the providers to be used by the realm.setPublicKey(PublicKey publicKey) Set the PublicKey to be used by the realm.Set the root path to be used by the realm.setSecretKey(SecretKey secretKey) Set the SecretKey to be used by the realm.
-
Method Details
-
setRoot
Set the root path to be used by the realm.- Parameters:
root- the root path of the identity store (must not benull)- Returns:
- this builder.enc
-
setNameRewriter
Set the name rewriter to be used by the realm.- Parameters:
nameRewriter- the name rewriter to apply to looked up names (must not benull)- Returns:
- this builder.
-
setLevels
Set the number of levels to be used by the realm.- Parameters:
levels- the number of levels of directory hashing to apply- Returns:
- this builder.
-
setEncoded
Set whether the identity name should be encoded for the filename in the realm.- Parameters:
encoded- whether identity names should be BASE32 encoded before using as filename (only applies if the security realm is unencrypted)- Returns:
- this builder.
-
setHashCharset
Set the character set to be used by the realm.- Parameters:
hashCharset- the character set to use when converting password strings to a byte array. Uses UTF-8 by default. (must not benull)- Returns:
- this builder.
-
setHashEncoding
Set the string format for hashed passwords to be used by the realm.- Parameters:
hashEncoding- the string format for the hashed passwords. Uses Base64 by default. (must not benull)- Returns:
- this builder.
-
setSecretKey
Set the SecretKey to be used by the realm.- Parameters:
secretKey- the symmetric SecretKey used to encrypt and decrypt the Security Realm (must not benull)- Returns:
- this builder.
-
setProviders
Set the providers to be used by the realm.- Parameters:
providers- the provider to be used (must not benull)- Returns:
- this builder.
-
setPrivateKey
Set the PrivateKey to be used by the realm.- Parameters:
privateKey- the asymmetric PrivateKey used to sign the identity files used for file integrity (must not benull)- Returns:
- this builder.
-
setPublicKey
Set the PublicKey to be used by the realm.- Parameters:
publicKey- the asymmetric PublicKey used to verify the identity files used for file integrity (must not benull)- Returns:
- this builder.
-
build
Builds a newFileSystemSecurityRealminstance based on configuration defined for thisFileSystemSecurityRealmBuilderinstance.- Returns:
- the built realm
-