Class LoginConverter

java.lang.Object
com.mwdle.bitwarden.converters.LoginConverter
All Implemented Interfaces:
CredentialConverter

@Extension public final class LoginConverter extends Object implements CredentialConverter
Converts BitwardenItemType.LOGIN items into Jenkins UsernamePasswordCredentialsImpl.
  • Constructor Details

    • LoginConverter

      public LoginConverter()
  • Method Details

    • createProxy

      @NonNull public com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials createProxy(@NonNull String id, @NonNull BitwardenItemMetadata metadata)
      Description copied from interface: CredentialConverter
      Creates a lightweight, lazy-loading CredentialProxy.
      Specified by:
      createProxy in interface CredentialConverter
      Parameters:
      id - the Jenkins credential ID
      metadata - the Bitwarden item metadata
      Returns:
      a Jenkins credential proxy
    • convert

      @NonNull public com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl convert(@NonNull String id, @NonNull String description, @NonNull BitwardenItem item)
      Description copied from interface: CredentialConverter
      Creates a concrete Jenkins StandardCredentials.

      Called by the CredentialProxy after the full item is fetched from the Bitwarden CLI.

      Specified by:
      convert in interface CredentialConverter
      Parameters:
      id - the Jenkins credential ID
      description - the user-facing description
      item - the Bitwarden item
      Returns:
      the concrete Jenkins credential