Replies: 3 comments 2 replies
-
Did you check out https://loopback.io/doc/en/lb4/Implement-your-own-strategy.html? |
Beta Was this translation helpful? Give feedback.
-
You can have multiple authentication strategies for the same endpoint. |
Beta Was this translation helpful? Give feedback.
-
@raymondfeng In my controller, I am calling authenticate() function with options as For some reason
|
Beta Was this translation helpful? Give feedback.
-
I want to restrict API access with an access-key how most of the APIs provide read access to anonymous users. In my use case my frontend isn't guarded with JWT or any token. I won't to prevent any random person post to my API.
I want to give my frontend read access to come endpoint while write access to other. besides frontend I will have other API connecting to my API with different access key which allows read to some end points and write to other.
I have asked this on StackOverflow https://stackoverflow.com/questions/75151068/loopback-4-interceptor-with-metadata-similar-to-authorize.
I want to add some metadata while calling interceptor something like @intercept('interceptors.accessKey', {metadata: { resource: 'Device', scopes: ['read'] }}).
I know Loopback 4 provides special interceptor @authorize but I don't believe I can use it without @authenticate('jwt'). My use case do not have room for authentication. How can I achieve this?
Beta Was this translation helpful? Give feedback.
All reactions