This includes:
- SetupAuthContext: Setups authContext with new authContext fields.
- NewAuthContext: Create AuthContext with using authContext fields
from caller function.
Auth constructor should handle creation of Kratos, database,
ApiKeyService itself for benefit to other dependent modules/repos. The
Prompt module does not need db instance hence it should not pass db
parameter when initializing Auth context and middleware.
Signed-off-by: Akshay Gaikwad <akshay.gaikwad@rafay.co>
* Expose NewSessionContext function
When auth middleware or interceptor is being mocked by other service
then they can take help of `session.NewSessionContext` to store mocked
session data to request context.
* Initialize _log in auth at creating
* Allow excluding URLs in Auth middleware
* restructure rcloud-base as a single base controller
* updated master.rest
* moved sentry from internal to pkg as it is used by relay
* removing unused rpc and it's dependencies
* Fix usermgmt tests
* Don't redefine variables in rest file
Co-authored-by: Abin Simon <abin.simon@rafay.co>