Class ScriptCredentialVault

java.lang.Object
org.springframework.extensions.webscripts.ScriptCredentialVault

public final class ScriptCredentialVault extends Object
Represents the credential vault to the script engine This exposes credentials from the vault which are "user" managed
Author:
muzquiano
  • Field Details

  • Constructor Details

    • ScriptCredentialVault

      public ScriptCredentialVault(CredentialVault vault, User user)
      Constructs a new ScriptCredentialVault object.
      Parameters:
      vault - The credential vault instance
      user - The user to whom the credential vault belongs
  • Method Details

    • getProperties

      public ScriptableMap<String,Serializable> getProperties()
      Returns the properties of the credential vault
    • getUser

      public User getUser()
      Returns the user to whom this credential vault belongs
    • hasCredentials

      public boolean hasCredentials(String endpointId)
      Returns whether the given endpoint credentials are stored on this vault
      Parameters:
      endpointId - String
      Returns:
      boolean
    • newCredentials

      public ScriptCredentials newCredentials(String endpointId)
      Creates new credentials and binds them into this vault. If the credentials already exist, the old ones will be returned
      Parameters:
      endpointId - String
      Returns:
      ScriptCredentials
    • removeCredentials

      public void removeCredentials(String endpointId)
      Removes credentials from the vault
      Parameters:
      endpointId - String
    • save

      public void save()
      Saves the credential vault