/** * Authentication filters * @packageDocumentation */ import { Filter } from "../filter"; /** * Basic authentication credentials */ export interface Credentials { /** * User */ user: string; /** * Password */ password: string; } /** * Extracts credentials following the "Basic" HTTP Authentication scheme * (see [RFC 7617](https://tools.ietf.org/html/rfc7617)) * * @param realm - Authentication realm */ export declare function basic(realm: string): Filter<[Credentials]>; /** * Extracts a OAuth 2.0 bearer token * (see [RFC 6750](https://tools.ietf.org/html/rfc6750)) * * This filter doesn't support the use of a [form-encoded body parameter](https://tools.ietf.org/html/rfc6750#section-2.2). * * @param realm - Authentication realm * @param scopes - Authentication scopes */ export declare function bearer(realm: string, scopes?: string[]): Filter<[string]>;