org.apache.synapse.securevault

## Class SecretResolver

- java.lang.Object
- - org.apache.synapse.securevault.SecretResolver

-     public class SecretResolver
      extends java.lang.Object

  Responsible for resolving secrets such as password. The secrets this SecretResolver should be resolved , can be given as protected Tokens and the use of this class can explicitly check whether a token is protected.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SecretResolver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addProtectedToken(java.lang.String token)` Registers a token as a Protected Token
    `void` | `init(SecretCallbackHandler secretCallbackHandler)` Initializes by giving an instance of `SecretCallbackHandler` to be used to retrieve secrets
    `boolean` | `isInitialized()` Checks the state of the rule engine.
    `boolean` | `isTokenProtected(java.lang.String token)` Checks whether a token is a Protected Token
    `java.lang.String` | `resolve(java.lang.String encryptedPassword)` Resolved given password using an instance of a PasswordProvider
    `java.lang.String` | `resolve(java.lang.String encryptedPassword, java.lang.String prompt)` Resolved given password using an instance of a PasswordProvider
    `void` | `shutDown()` Shutdown the secret resolver

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SecretResolver

          public SecretResolver()

  - ### Method Detail

    - #### init

          public void init(SecretCallbackHandler secretCallbackHandler)

      Initializes by giving an instance of `SecretCallbackHandler` to be used to retrieve secrets
      Parameters:
        `secretCallbackHandler` - `SecretCallbackHandler` instance

    - #### resolve

          public java.lang.String resolve(java.lang.String encryptedPassword)

      Resolved given password using an instance of a PasswordProvider
      Parameters:
        `encryptedPassword` - Encrypted password
      Returns:
        resolved password

    - #### resolve

          public java.lang.String resolve(java.lang.String encryptedPassword,
                                          java.lang.String prompt)

      Resolved given password using an instance of a PasswordProvider
      Parameters:
        `encryptedPassword` - Encrypted password
        `prompt` - to be used to interact with user
      Returns:
        resolved password

    - #### addProtectedToken

          public void addProtectedToken(java.lang.String token)

      Registers a token as a Protected Token
      Parameters:
        `token` - `String` representation of a token

    - #### isTokenProtected

          public boolean isTokenProtected(java.lang.String token)

      Checks whether a token is a Protected Token
      Parameters:
        `token` - `String` representation of a token
      Returns:
        `true` if the token is a Protected Token

    - #### isInitialized

          public boolean isInitialized()

      Checks the state of the rule engine. It is recommended to check state of the this component prior to access any methods of this
      Returns:
        `true`if the rule engine has been initialized``

    - #### shutDown

          public void shutDown()

      Shutdown the secret resolver

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.