UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

88 lines (43 loc) 1.94 kB
--- lang: en title: 'API docs: authentication.authenticationoptions' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/authentication permalink: /doc/en/lb4/apidocs.authentication.authenticationoptions.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/authentication](./authentication.md) &gt; [AuthenticationOptions](./authentication.authenticationoptions.md) ## AuthenticationOptions interface Options for authentication component **Signature:** ```typescript export interface AuthenticationOptions ``` ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td markdown="1"> [defaultMetadata?](./authentication.authenticationoptions.defaultmetadata.md) </td><td markdown="1"> </td><td markdown="1"> [AuthenticationMetadata](./authentication.authenticationmetadata.md)<!-- -->\[\] </td><td markdown="1"> _(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. </td></tr> <tr><td markdown="1"> [failOnError?](./authentication.authenticationoptions.failonerror.md) </td><td markdown="1"> </td><td markdown="1"> boolean </td><td markdown="1"> _(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. </td></tr> </tbody></table>