|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wildfly.extras.creaper.commands.auth.PropertiesFileAuth
public final class PropertiesFileAuth
Provides a set of offline commands to manipulate authentication and authorization .properties files.
The generic factory methods (inConfigurationDirectory(String) or of(java.io.File)) return
an instance of this class, so that methods for working with users and methods for working with user mappings
are both available.
The configuration file specific factory methods (applicationUsers(), applicationRoles(),
mgmtUsers() and mgmtGroups()) return an instance of a view class that only exposes methods for
working with users (PropertiesFileAuth.Users) or methods for working with user mappings (PropertiesFileAuth.UserMappings). This is only
for convenience (static checking), there's no change in functionality.
| Nested Class Summary | |
|---|---|
static class |
PropertiesFileAuth.UserMappings
Convenience view on PropertiesFileAuth that only exposes methods for working with user mappings. |
static class |
PropertiesFileAuth.Users
Convenience view on PropertiesFileAuth that only exposes methods for working with users. |
| Method Summary | |
|---|---|
static PropertiesFileAuth.UserMappings |
applicationRoles()
Creates a PropertiesFileAuth.UserMappings object for the application-roles.properties file
in the configuration directory of the OfflineManagementClient. |
static PropertiesFileAuth.Users |
applicationUsers()
Creates a PropertiesFileAuth.Users object for the application-users.properties file
in the configuration directory of the OfflineManagementClient. |
OfflineCommand |
defineUser(String username,
String password)
Ensures that the .properties file, which must be a *-users.properties file, contains
a definition of a user with given username and given password. |
OfflineCommand |
defineUserMapping(String username,
String roleOrGroup)
Ensures that the .properties file, which must be a *-<groups|roles>.properties file, contains
a mapping of a user with given username to given role/group (roleOrGroup). |
static PropertiesFileAuth |
inConfigurationDirectory(String fileName)
Creates a PropertiesFileAuth object for the file named fileName that resides
in the configuration directory of the OfflineManagementClient. |
static PropertiesFileAuth.UserMappings |
mgmtGroups()
Creates a PropertiesFileAuth.UserMappings object for the mgmt-groups.properties file
in the configuration directory of the OfflineManagementClient. |
static PropertiesFileAuth.Users |
mgmtUsers()
Creates a PropertiesFileAuth.Users object for the mgmt-users.properties file
in the configuration directory of the OfflineManagementClient. |
static PropertiesFileAuth |
of(File file)
Creates a PropertiesFileAuth object for given file. |
OfflineCommand |
undefineUser(String username)
Ensures that the .properties file, which must be a *-users.properties file, doesn't
contain a definition of a user with given username. |
OfflineCommand |
undefineUserMapping(String username,
String roleOrGroup)
Ensures that the .properties file, which must be a *-<groups|roles>.properties file,
doesn't contain a mapping of a user with given username to given role/group (roleOrGroup). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PropertiesFileAuth.Users applicationUsers()
PropertiesFileAuth.Users object for the application-users.properties file
in the configuration directory of the OfflineManagementClient.
public static PropertiesFileAuth.UserMappings applicationRoles()
PropertiesFileAuth.UserMappings object for the application-roles.properties file
in the configuration directory of the OfflineManagementClient.
public static PropertiesFileAuth.Users mgmtUsers()
PropertiesFileAuth.Users object for the mgmt-users.properties file
in the configuration directory of the OfflineManagementClient.
public static PropertiesFileAuth.UserMappings mgmtGroups()
PropertiesFileAuth.UserMappings object for the mgmt-groups.properties file
in the configuration directory of the OfflineManagementClient.
public static PropertiesFileAuth inConfigurationDirectory(String fileName)
PropertiesFileAuth object for the file named fileName that resides
in the configuration directory of the OfflineManagementClient.
public static PropertiesFileAuth of(File file)
PropertiesFileAuth object for given file.
public OfflineCommand defineUser(String username,
String password)
.properties file, which must be a *-users.properties file, contains
a definition of a user with given username and given password.
public OfflineCommand undefineUser(String username)
.properties file, which must be a *-users.properties file, doesn't
contain a definition of a user with given username.
public OfflineCommand defineUserMapping(String username,
String roleOrGroup)
.properties file, which must be a *-<groups|roles>.properties file, contains
a mapping of a user with given username to given role/group (roleOrGroup).
public OfflineCommand undefineUserMapping(String username,
String roleOrGroup)
.properties file, which must be a *-<groups|roles>.properties file,
doesn't contain a mapping of a user with given username to given role/group (roleOrGroup).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||