Skip to content

Security cross-cutting concerns #108

Answered by Sairyss
emedina asked this question in Q&A
Discussion options

You must be logged in to vote

It's hard to tell without implementing it in code and experimenting a little bit.
If you need to get this tokens for every endpoint, the simplest solution that comes to mind is to use some kind of middleware that intercepts your HTTP request and extracts the token, converts it to the RequestType then sets it somewhere in a request context. When you need to call an external API with that RequestType you just get it from the context. This way you avoid propagating it everywhere.

why would my Application Core be concerned about something that it's not needed inside the hexagon? Just to be a bridge to pass it over to the Output Port?

Application services in the application core are just a b…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@emedina
Comment options

Answer selected by emedina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants