docker fixes
This commit is contained in:
@@ -58,11 +58,7 @@ func (h *OAuthHandler) SessionLogin(c *gin.Context) {
|
||||
|
||||
redirectURL, err := h.svc.SessionLogin(c.Request.Context(), input.Session, input.Email, input.Password)
|
||||
if err != nil {
|
||||
if err == services.ErrInvalidGrant {
|
||||
oauthErrorJSON(c, services.ErrInvalidGrant)
|
||||
} else {
|
||||
oauthErrorJSON(c, services.ErrAccessDenied)
|
||||
}
|
||||
oauthErrorJSON(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -91,7 +87,7 @@ func (h *OAuthHandler) SessionAttach(c *gin.Context) {
|
||||
|
||||
redirectURL, err := h.svc.SessionAttach(c.Request.Context(), input.Session, accessToken)
|
||||
if err != nil {
|
||||
oauthErrorJSON(c, services.ErrAccessDenied)
|
||||
oauthErrorJSON(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -114,7 +110,12 @@ func (h *OAuthHandler) SessionApprove(c *gin.Context) {
|
||||
}
|
||||
|
||||
if !input.Allow {
|
||||
oauthErrorJSON(c, services.ErrAccessDenied)
|
||||
redirectURL, err := h.svc.SessionDeny(c.Request.Context(), input.Session)
|
||||
if err != nil {
|
||||
oauthErrorJSON(c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"redirect_url": redirectURL})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user