Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceNameFromContext ¶
func GetServiceNameFromContext(rCtx *app.RequestContext) (uint64, error)
GetServiceNameFromContext should be called only after the request has passed through the AuthenticateService middleware. If called before, it will always return an error.
func GetUserIdFromContext ¶
func GetUserIdFromContext(rCtx *app.RequestContext) (uint64, error)
GetUserIdFromContext should be called only after the request has passed through the AuthenticateUser middleware. If called before, it will always return an error.
Types ¶
type MiddlewareAuth ¶
type MiddlewareAuth struct {
// contains filtered or unexported fields
}
func NewAuthMiddleware ¶
func NewAuthMiddleware(rUser user.UserResource, authUserSecretKey string, authAllowedServices map[string]string) *MiddlewareAuth
func (*MiddlewareAuth) AuthenticateService ¶
func (mw *MiddlewareAuth) AuthenticateService() app.HandlerFunc
func (*MiddlewareAuth) AuthenticateUser ¶
func (mw *MiddlewareAuth) AuthenticateUser() app.HandlerFunc
func (*MiddlewareAuth) AuthorizeBuyer ¶
func (mw *MiddlewareAuth) AuthorizeBuyer() app.HandlerFunc
func (*MiddlewareAuth) AuthorizeSeller ¶
func (mw *MiddlewareAuth) AuthorizeSeller() app.HandlerFunc
Click to show internal directories.
Click to hide internal directories.