Class FileSystemSecurityRealmBuilder

    • Constructor Detail

      • FileSystemSecurityRealmBuilder

        FileSystemSecurityRealmBuilder()
    • Method Detail

      • setRoot

        public FileSystemSecurityRealmBuilder setRoot​(Path root)
        Set the root path to be used by the realm.
        Parameters:
        root - the root path of the identity store (must not be null)
        Returns:
        this builder.enc
      • setNameRewriter

        public FileSystemSecurityRealmBuilder setNameRewriter​(NameRewriter nameRewriter)
        Set the name rewriter to be used by the realm.
        Parameters:
        nameRewriter - the name rewriter to apply to looked up names (must not be null)
        Returns:
        this builder.
      • setLevels

        public FileSystemSecurityRealmBuilder setLevels​(int levels)
        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

        public FileSystemSecurityRealmBuilder setEncoded​(boolean encoded)
        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

        public FileSystemSecurityRealmBuilder setHashCharset​(Charset hashCharset)
        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 be null)
        Returns:
        this builder.
      • setHashEncoding

        public FileSystemSecurityRealmBuilder setHashEncoding​(Encoding hashEncoding)
        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 be null)
        Returns:
        this builder.
      • setSecretKey

        public FileSystemSecurityRealmBuilder setSecretKey​(SecretKey secretKey)
        Set the SecretKey to be used by the realm.
        Parameters:
        secretKey - the symmetric SecretKey used to encrypt and decrypt the Security Realm (must not be null)
        Returns:
        this builder.
      • setProviders

        public FileSystemSecurityRealmBuilder setProviders​(Supplier<Provider[]> providers)
        Set the providers to be used by the realm.
        Parameters:
        providers - the provider to be used (must not be null)
        Returns:
        this builder.
      • setPrivateKey

        public FileSystemSecurityRealmBuilder setPrivateKey​(PrivateKey privateKey)
        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 be null)
        Returns:
        this builder.
      • setPublicKey

        public FileSystemSecurityRealmBuilder setPublicKey​(PublicKey publicKey)
        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 be null)
        Returns:
        this builder.