ICredentialStore

Interface for credential stores which are used to store and lookup credentials to authenticate against external services.

Description

The ICredentialStore interface is used to store and look up credentials used to authenticate against external services.

Methods

Lookup

Lookups credential parameters by its key.

Lookup(ctx context.Context, context IContext, key string) (*CredentialParams, error)

  • ctx: context.Context - operation context.
  • context: IContext - (optional) a context to trace execution through a call chain.
  • key: string - key used to uniquely identify the credential.
  • returns: (*CredentialParams, error) - found credential parameters or nil if nothing was found.

Store

Stores credential parameters into the store.

Store(ctx context.Context, context IContext, key string, credential *CredentialParams) error

  • ctx: context.Context - operation context.
  • context: IContext - (optional) a context to trace execution through a call chain.
  • key: string - key used to uniquely identify the credential.
  • credential: *CredentialParams - credential to be stored.
  • returns: error - return error if not stored

See also