@@ -86,7 +86,7 @@ func AuthorizeHandler() gin.HandlerFunc {
8686
8787 loginError := map [string ]interface {}{
8888 "type" : "authorization_response" ,
89- "response" : map [string ]string {
89+ "response" : map [string ]interface {} {
9090 "error" : "login_required" ,
9191 "error_description" : "Login is required" ,
9292 },
@@ -113,7 +113,7 @@ func AuthorizeHandler() gin.HandlerFunc {
113113 log .Debug ("GetUserByID failed: " , err )
114114 handleResponse (gc , responseMode , loginURL , redirectURI , map [string ]interface {}{
115115 "type" : "authorization_response" ,
116- "response" : map [string ]string {
116+ "response" : map [string ]interface {} {
117117 "error" : "signup_required" ,
118118 "error_description" : "Sign up required" ,
119119 },
@@ -181,7 +181,7 @@ func AuthorizeHandler() gin.HandlerFunc {
181181
182182 handleResponse (gc , responseMode , loginURL , redirectURI , map [string ]interface {}{
183183 "type" : "authorization_response" ,
184- "response" : map [string ]string {
184+ "response" : map [string ]interface {} {
185185 "code" : code ,
186186 "state" : state ,
187187 },
@@ -287,7 +287,7 @@ func validateAuthorizeRequest(responseType, responseMode, clientID, state, codeC
287287
288288func handleResponse (gc * gin.Context , responseMode , loginURI , redirectURI string , data map [string ]interface {}, httpStatusCode int ) {
289289 isAuthenticationRequired := false
290- if _ , ok := data ["response" ].(map [string ]string )["error" ]; ok {
290+ if _ , ok := data ["response" ].(map [string ]interface {} )["error" ]; ok {
291291 isAuthenticationRequired = true
292292 }
293293
@@ -308,7 +308,7 @@ func handleResponse(gc *gin.Context, responseMode, loginURI, redirectURI string,
308308 case constants .ResponseModeFormPost :
309309 gc .HTML (httpStatusCode , authorizeFormPostTemplate , gin.H {
310310 "target_origin" : redirectURI ,
311- "authorization_response" : data ,
311+ "authorization_response" : data [ "response" ] ,
312312 })
313313 return
314314 }
0 commit comments