Package org.mycore.mcr.acl.accesskey.cli
Class MCRAccessKeyCommands
java.lang.Object
org.mycore.mcr.acl.accesskey.cli.MCRAccessKeyCommands
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
cleanUp()
static void
static void
clearAccessKeys
(String objectIdString) static void
createAccessKey
(String objectIdString, String pathString) static void
exportAccessKeysToFile
(String objectIdString, String pathString) static void
hashSecret
(String secret, String objectIdString) static void
importAccessKeysFromFile
(String objectIdString, String pathString) static void
removeAccessKey
(String objectIdString, String secret) static void
updateAccessKey
(String objectIdString, String secret, String pathString)
-
Constructor Details
-
MCRAccessKeyCommands
public MCRAccessKeyCommands()
-
-
Method Details
-
clearAccessKeys
@MCRCommand(syntax="clear all access keys", help="Clears all access keys") public static void clearAccessKeys() -
clearAccessKeys
@MCRCommand(syntax="clear all access keys for {0}", help="Clears all access keys for MCRObject/Derivate {0}") public static void clearAccessKeys(String objectIdString) throws MCRException - Throws:
MCRException
-
createAccessKey
@MCRCommand(syntax="create access key for {0} from file {1}", help="Creates an access key {0} for MCRObject/Derivate from file {1} in json format") public static void createAccessKey(String objectIdString, String pathString) throws IOException, MCRException - Throws:
IOException
MCRException
-
updateAccessKey
@MCRCommand(syntax="update access key for {0} with secret {1} from file {2}", help="Updates an access key for MCRObject/Derivate {0} with (hashed) secret {1} from file {2} in json format") public static void updateAccessKey(String objectIdString, String secret, String pathString) throws IOException, MCRException - Throws:
IOException
MCRException
-
removeAccessKey
@MCRCommand(syntax="delete access key for {0} with secret {1}", help="Deletes an access key for MCRObject/Derivate {0} with (hashed) secret {1}") public static void removeAccessKey(String objectIdString, String secret) throws MCRException - Throws:
MCRException
-
importAccessKeysFromFile
@MCRCommand(syntax="import access keys for {0} from file {1}", help="Imports access keys for MCRObject/Derivate {0} from file {1} in json array format") public static void importAccessKeysFromFile(String objectIdString, String pathString) throws IOException, MCRException - Throws:
IOException
MCRException
-
exportAccessKeysToFile
@MCRCommand(syntax="export access keys for {0} to file {1}", help="Exports access keys for MCRObject/Derivate {0} to file {1} in json array format") public static void exportAccessKeysToFile(String objectIdString, String pathString) throws IOException, MCRException - Throws:
IOException
MCRException
-
cleanUp
@MCRCommand(syntax="clean up access key user attributes", help="Cleans all access key secret attributes of users if the corresponding key does not exist.") public static void cleanUp() -
hashSecret
@MCRCommand(syntax="hash access key secret {0} for {1}", help="Hashes secret {0} for MCRObject/Derivate {1}") public static void hashSecret(String secret, String objectIdString) throws MCRException - Throws:
MCRException
-