Page Contents

Home > @loopback/authentication > AuthenticationOptions

AuthenticationOptions interface

Options for authentication component

Signature:

export interface AuthenticationOptions 

Properties

Property Modifiers Type Description
[defaultMetadata?](/doc/en/lb4/apidocs.authentication.authenticationoptions.defaultmetadata.html) [AuthenticationMetadata](/doc/en/lb4/apidocs.authentication.authenticationmetadata.html)\[\] _(Optional)_ Default authentication metadata if a method or class is not decorated with `@authenticate`. If not set, no default authentication will be enforced for those methods without authentication metadata.
[failOnError?](/doc/en/lb4/apidocs.authentication.authenticationoptions.failonerror.html) boolean _(Optional)_ This flag allows an authentication strategy to abort the authentication by throwing an error if `failOnError` is set to `true`. By default, the authentication process continues to the next one even when a strategy throws an error. If one of other strategies succeed, the error will be discarded.