From: Krzysztof B. <kb...@un...> - 2016-12-15 15:12:30
|
Hi Jan, W dniu 15.12.2016 o 15:50, Jan Wielemaker pisze: > Hi, > > I'm completely new to Unity. I'm trying to setup an experimental server, > first using an oauth2 client. Setting up Unity itself is easy :) > > I minimally edited oauth2-as.properties, changed issuerUri and > usersGroup: > > unity.oauth2.as.issuerUri=https://woezel.ia.cwi.nl:2443/oauth2 > unity.oauth2.as.usersGroup=/ > > I have added a client to /oauth-clients as a new entity using > 'identifier' "swish@turin", adding attributes > > sys:oauth:groupForClient=/ > sys:oauth:allowedReturnURI=https://turin.ia.cwi.nl:1443/oauth2-reply > sys:oauth:allowedGrantFlows=authorizationCode > > According to "Server management" tab, UNITY OAuth2 Authorization Server: > Context address: /oauth2-as > > So, I redirect to > https://woezel.ia.cwi.nl:2443/oauth2-as?response_type=code&client_id=swish@turin&redirect_uri=https%3A//turin.ia.cwi.nl%3A1443/oauth2-reply&scope=profile > > This causes the browser to redirect to (not the "as/") > https://woezel.ia.cwi.nl:2443/oauth2-as/?response_type=code&client_id=swish@turin&redirect_uri=https%3A//turin.ia.cwi.nl%3A1443/oauth2-reply&scope=profile > > which returns 404 :( > > Note that both Unity and the target client use self-signed SSL > certificates (although > I don't think that matters). > > What am I missing? Context address of the endpoint is root part of the path (which you control) - /oauth2-as in your case. Under it there are typically some fixed paths which are internal detail of the endpoint in question. Docs provide info on those paths. So in this case you need to append .../oauth2-authz in the request. path. HTH, Krzysztof |