Adrien Marquès
fd1ced5a8b
fix: restore request denied on invalid auth after contextual middlwares
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2021-06-20 10:24:12 +02:00
Adrien Marquès
af63c4514b
refactor: idiomatic remove of api.Context for context.Context, custom middlewares for standard http middlewares
...
continuous-integration/drone/push Build is passing
Details
- remove api.Context as using context.Context is more idiomatic
- remove api.Adapter as it is redundant with func(http.Handler) http.Handler
- remove authentication middlewares as they be achieved as normal middlewares but launched around the handler (after the service has been found and validated)
- builder.With() adds an standard Middleware that runs before any aicra code
- builder.WithContext() adds an http middleware that runs just before the service handler is called. The http.Request provided contains a context with useful values such as the required permissions (from the service configuration).
- handlers take a context.Context variable as first argument instead of api.Context
2021-06-20 02:14:31 +02:00
Adrien Marquès
53dfc8f679
feat: *api.Context is required as first handler argument
continuous-integration/drone/push Build is passing
Details
2021-06-20 00:47:04 +02:00
Adrien Marquès
fa1ecfd97f
feat: create internal context.Context custom keys
2021-06-20 00:46:04 +02:00
xdrm-brackets
c35e2fdd9a
fix: do not use optional (nil) inputs for dynamic scope
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2021-05-18 17:45:07 +02:00
xdrm-brackets
2a17ba2f72
fix: allow non-Stringer using %v format (unsafe but does the job)
2021-05-18 16:24:31 +02:00
xdrm-brackets
346cc4e557
feat: add dynamic scope from request's input
...
- all occurences of '[abc]' where 'abc' is a valid input name ('name' field from json) is replaced with its value between square brackets
2021-05-18 16:06:49 +02:00
xdrm-brackets
4a62df8029
feat: handle auth adapters
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
2021-05-18 09:59:49 +02:00
xdrm-brackets
4f55302e8a
feat: add WithAuth() to builder using api.AuthAdapter interface
2021-05-18 09:36:33 +02:00
Adrien Marquès
d6f8457274
feat: pass optional context argument to handlers
continuous-integration/drone/push Build is passing
Details
2021-04-18 19:31:54 +02:00
Adrien Marquès
3986f7a022
fix: remove recoverer and body closer; must be users' responsability
2021-04-18 17:53:53 +02:00
Adrien Marquès
14ae59561c
feat: encapsulate request handling into adapters
2021-04-18 16:50:02 +02:00
Adrien Marquès
11aa9f0a0f
fix: global handler recoverer
2021-03-28 19:05:43 +02:00
Adrien Marquès
468a09be8d
update: rename 'Server' into 'Handler'
2021-03-28 19:03:16 +02:00
Adrien Marquès
b1498e59c1
clarity rename: dynamic package to dynfunc
2020-04-04 10:36:52 +02:00
Adrien Marquès
e1606273dd
remove useless func type
2020-04-04 10:10:24 +02:00
Adrien Marquès
e7dd1e7a56
migrate handler from api to aicra; check for service when setting handler
2020-03-29 15:04:12 +02:00