# Delegate ProvidePasswordCallback

Namespace
  Npgsql

Assembly
  Npgsql.dll

Represents a method that allows the application to provide a password at connection time in code rather than configuration

    [Obsolete("Use NpgsqlDataSourceBuilder.UsePeriodicPasswordProvider or inject passwords directly into NpgsqlDataSource.Password")]
    public delegate string ProvidePasswordCallback(string host, int port, string database, string username)

#### Parameters

`host` string

  Hostname

`port` int

  Port

`database` string

  Database Name

`username` string

  User

#### Returns

string

  A valid password for connecting to the database