Skip to content

Commit

Permalink
feat: oauth interface auth (#857)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Dec 3, 2021
1 parent d063ef2 commit 3f6e672
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions manager/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ func Init(cfg *config.Config, service service.REST, enforcer *casbin.Enforcer) (
pm.GET("", h.GetPermissions(r))

// Oauth
oa := apiv1.Group("/oauth", jwt.MiddlewareFunc(), rbac)
oa.POST("", h.CreateOauth)
oa.DELETE(":id", h.DestroyOauth)
oa.PATCH(":id", h.UpdateOauth)
oa := apiv1.Group("/oauth")
oa.POST("", h.CreateOauth, jwt.MiddlewareFunc(), rbac)
oa.DELETE(":id", h.DestroyOauth, jwt.MiddlewareFunc(), rbac)
oa.PATCH(":id", h.UpdateOauth, jwt.MiddlewareFunc(), rbac)
oa.GET(":id", h.GetOauth)
oa.GET("", h.GetOauths)

Expand Down

0 comments on commit 3f6e672

Please sign in to comment.