Class GrouperPasswordSave

java.lang.Object
edu.internet2.middleware.grouper.authentication.GrouperPasswordSave

public class GrouperPasswordSave extends Object

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 Details

    • GrouperPasswordSave

      public GrouperPasswordSave()
  • Method Details

    • main

      public static void main(String[] args)
    • assignSaveMode

      public GrouperPasswordSave assignSaveMode(SaveMode theSaveMode)
      assign save mode
      Parameters:
      theSaveMode -
      Returns:
      this for chaining
    • assignSaveMode

      public GrouperPasswordSave assignSaveMode(String theSaveMode)
      assign save mode
      Parameters:
      theSaveMode -
      Returns:
      this for chaining
    • assignMemberId

      public GrouperPasswordSave assignMemberId(String memberId)
    • assignPublicKey

      public GrouperPasswordSave assignPublicKey(String publicKey)
    • canAccessWsJwtKeys

      public static boolean canAccessWsJwtKeys(Subject subject, Subject localEntitySubject)
    • save

      public void save()
      save credentials into the database
    • assignUsername

      public GrouperPasswordSave assignUsername(String username)
      assign username to be stored
      Parameters:
      username -
      Returns:
    • assignAllowedFromCidrs

      public GrouperPasswordSave assignAllowedFromCidrs(String allowedFromCidrs)
      assign allowed from cidrs
      Parameters:
      allowedFromCidrs -
      Returns:
    • assignMemberIdWhoSetPassword

      public GrouperPasswordSave assignMemberIdWhoSetPassword(String memberIdWhoSetPassword)
      assign memberIdWhoSetPassword
      Parameters:
      memberIdWhoSetPassword -
      Returns:
    • assignExpiresAt

      public GrouperPasswordSave assignExpiresAt(Long expiresAt)
      assign expiresAt
      Parameters:
      expiresAt -
      Returns:
    • assignEntityType

      public GrouperPasswordSave assignEntityType(String entityType)
      assign entity type e.g. username
      Parameters:
      entityType -
      Returns:
    • assignEncryptionType

      public GrouperPasswordSave assignEncryptionType(GrouperPassword.EncryptionType encryptionType)
      assign encryption type
      Parameters:
      encryptionType -
      Returns:
    • assignPassword

      public GrouperPasswordSave assignPassword(String password)
      assign password to be stored
      Parameters:
      password -
      Returns:
    • assignApplication

      public GrouperPasswordSave assignApplication(GrouperPassword.Application application)
      assign application type (ws or ui)
      Parameters:
      application -
      Returns:
    • assignUuid

      public GrouperPasswordSave assignUuid(String theUuid)
      uuid
      Parameters:
      theUuid -
      Returns:
      uuid
    • getUsername

      public String getUsername()
      Returns:
      the username
    • getEntityType

      public String getEntityType()
      Returns:
      the entityType
    • getEncryptionType

      public GrouperPassword.EncryptionType getEncryptionType()
      Returns:
      the encryptionType
    • getThePassword

      public String getThePassword()
      Returns:
      the thePassword
    • getApplication

      public GrouperPassword.Application getApplication()
      Returns:
      the application
    • assignRunAsRoot

      public GrouperPasswordSave assignRunAsRoot(boolean runAsRoot)
      set this to true to run as a root session
      Parameters:
      runAsRoot -
      Returns:
    • getSaveResultType

      public SaveResultType getSaveResultType()
      get the save result type after the save call
      Returns:
      save type
    • getAllowedFromCidrs

      public String getAllowedFromCidrs()
    • getExpiresAtDb

      public Long getExpiresAtDb()
    • assignReplaceAllSettings

      public GrouperPasswordSave assignReplaceAllSettings(boolean theReplaceAllSettings)
      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

      public String getMemberId()
    • getPublicKey

      public String getPublicKey()