Class GrouperPasswordSave
java.lang.Object
edu.internet2.middleware.grouper.authentication.GrouperPasswordSave
Use this class to add username and password in grouper registry
Sample call to create a username password for grouper ui
new GrouperPasswordSave().assignUsername("GrouperSystem").assignPassword("admin123").assignApplication(GrouperPassword.Application.UI).save();
Sample call to create a username password for grouper webservices
new GrouperPasswordSave().assignUsername("GrouperSystem").assignPassword("admin123").assignApplication(GrouperPassword.Application.WS).save();
Sample call to delete a username password for grouper ui
new GrouperPasswordSave().assignUsername("GrouperSystem").assignApplication(GrouperPassword.Application.UI).assignSaveMode("DELETE").save();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignAllowedFromCidrs
(String allowedFromCidrs) assign allowed from cidrsassignApplication
(GrouperPassword.Application application) assign application type (ws or ui)assignEncryptionType
(GrouperPassword.EncryptionType encryptionType) assign encryption typeassignEntityType
(String entityType) assign entity type e.g.assignExpiresAt
(Long expiresAt) assign expiresAtassignMemberId
(String memberId) assignMemberIdWhoSetPassword
(String memberIdWhoSetPassword) assign memberIdWhoSetPasswordassignPassword
(String password) assign password to be storedassignPublicKey
(String publicKey) assignReplaceAllSettings
(boolean theReplaceAllSettings) if you want to replace all the settings for the object, send true (that's the default).assignRunAsRoot
(boolean runAsRoot) set this to true to run as a root sessionassignSaveMode
(SaveMode theSaveMode) assign save modeassignSaveMode
(String theSaveMode) assign save modeassignUsername
(String username) assign username to be storedassignUuid
(String theUuid) uuidstatic boolean
canAccessWsJwtKeys
(Subject subject, Subject localEntitySubject) get the save result type after the save callstatic void
void
save()
save credentials into the database
-
Constructor Details
-
GrouperPasswordSave
public GrouperPasswordSave()
-
-
Method Details
-
main
-
assignSaveMode
assign save mode- Parameters:
theSaveMode
-- Returns:
- this for chaining
-
assignSaveMode
assign save mode- Parameters:
theSaveMode
-- Returns:
- this for chaining
-
assignMemberId
-
assignPublicKey
-
canAccessWsJwtKeys
-
save
public void save()save credentials into the database -
assignUsername
assign username to be stored- Parameters:
username
-- Returns:
-
assignAllowedFromCidrs
assign allowed from cidrs- Parameters:
allowedFromCidrs
-- Returns:
-
assignMemberIdWhoSetPassword
assign memberIdWhoSetPassword- Parameters:
memberIdWhoSetPassword
-- Returns:
-
assignExpiresAt
assign expiresAt- Parameters:
expiresAt
-- Returns:
-
assignEntityType
assign entity type e.g. username- Parameters:
entityType
-- Returns:
-
assignEncryptionType
assign encryption type- Parameters:
encryptionType
-- Returns:
-
assignPassword
assign password to be stored- Parameters:
password
-- Returns:
-
assignApplication
assign application type (ws or ui)- Parameters:
application
-- Returns:
-
assignUuid
uuid- Parameters:
theUuid
-- Returns:
- uuid
-
getUsername
- Returns:
- the username
-
getEntityType
- Returns:
- the entityType
-
getEncryptionType
- Returns:
- the encryptionType
-
getThePassword
- Returns:
- the thePassword
-
getApplication
- Returns:
- the application
-
assignRunAsRoot
set this to true to run as a root session- Parameters:
runAsRoot
-- Returns:
-
getSaveResultType
get the save result type after the save call- Returns:
- save type
-
getAllowedFromCidrs
-
getExpiresAtDb
-
assignReplaceAllSettings
if you want to replace all the settings for the object, send true (that's the default). If you want to update certain fields, send false.- Returns:
- this for chaining
-
getMemberId
-
getPublicKey
-