You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the above it's almost impossible to figure what's going on. The code is fragmented and you have to go back and fourth between several files to figure out what's going on. Also the response doesn't make much sense since it's a tuple with a map where an :error key value has been added. Not very helpful.
It should be a lot more compact an easy to read. Something along these lines, almost everything contained within this module:
defauthorize(resource_owner,request,config\\[])dorequest|>validate_response_type(config)|>casedo{:error,error}->response_type_validation_error({:error,error},request,config){:ok,token_module}->token_authorize(token_module,resource_owner,request,config)endenddefpresponse_type_validation_error({:error,error},request,config)do# Return HTTP error code or build redirect responseenddefptoken_authorize(Code,resource_owner,request,config),do: Code.authorize(resource_owner,request,config)
The text was updated successfully, but these errors were encountered:
I'm not happy with how responses are currently handled. As an example here's how an error response is handled:
ex_oauth2_provider/lib/ex_oauth2_provider/oauth2/authorization.ex
Lines 27 to 34 in 9a8fc6d
ex_oauth2_provider/lib/ex_oauth2_provider/oauth2/authorization.ex
Lines 48 to 49 in 9a8fc6d
ex_oauth2_provider/lib/ex_oauth2_provider/oauth2/authorization.ex
Lines 54 to 59 in 9a8fc6d
ex_oauth2_provider/lib/ex_oauth2_provider/oauth2/utils/error.ex
Lines 5 to 9 in 9a8fc6d
ex_oauth2_provider/lib/ex_oauth2_provider/oauth2/authorization/utils/response.ex
Lines 13 to 14 in 9a8fc6d
ex_oauth2_provider/lib/ex_oauth2_provider/oauth2/authorization/utils/response.ex
Lines 31 to 38 in 9a8fc6d
From the above it's almost impossible to figure what's going on. The code is fragmented and you have to go back and fourth between several files to figure out what's going on. Also the response doesn't make much sense since it's a tuple with a map where an
:error
key value has been added. Not very helpful.It should be a lot more compact an easy to read. Something along these lines, almost everything contained within this module:
The text was updated successfully, but these errors were encountered: