summaryrefslogtreecommitdiff
path: root/deps/rabbit/src/rabbit_credential_validator.erl
blob: 3b5d0752bf9184c9219cf339bb08581ff08fddb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2007-2020 VMware, Inc. or its affiliates.  All rights reserved.
%%

-module(rabbit_credential_validator).

-include("rabbit.hrl").

%% Validates a password. Used by `rabbit_auth_backend_internal`.
%%
%% Possible return values:
%%
%% * ok: provided password passed validation.
%% * {error, Error, Args}: provided password password failed validation.

-callback validate(rabbit_types:username(), rabbit_types:password()) -> 'ok' | {'error', string()}.