AuthInterceptor constructor
AuthInterceptor({})
Creates an AuthInterceptor.
tokenProvider is the callback to fetch the token.
excludePaths is the list of paths to skip authentication.
authPrefix is the prefix for the Authorization header.
headerKey is the header key for the Authorization header.
Implementation
AuthInterceptor({
required this.tokenProvider,
this.excludePaths,
this.authPrefix = 'Bearer',
this.headerKey = 'Authorization',
});