Auth code flow works through user approval page. Current problem is that it doesn't seem to be matching up auth codes correctly (I keep getting "invalid code" error). But, it looks like it's going through our custom token granter so that is good.
parent
626779b58e
commit
d94eb338ee
@ -1,49 +0,0 @@
|
||||
package org.mitre.openid.connect.web;
|
||||
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.oauth2.provider.AuthorizationRequest;
|
||||
import org.springframework.security.oauth2.provider.ClientDetails;
|
||||
import org.springframework.security.oauth2.provider.ClientDetailsService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/")
|
||||
public class AuthorizationEndpoint {
|
||||
|
||||
@Autowired
|
||||
private ClientDetailsService clientDetailsService;
|
||||
|
||||
//TODO: this endpoint needs to be protected
|
||||
@RequestMapping("/oauth/confirm_access")
|
||||
public ModelAndView getAccessConfirmation(
|
||||
@ModelAttribute AuthorizationRequest clientAuth) throws Exception {
|
||||
ClientDetails client = clientDetailsService
|
||||
.loadClientByClientId(clientAuth.getClientId());
|
||||
TreeMap<String, Object> model = new TreeMap<String, Object>();
|
||||
model.put("auth_request", clientAuth);
|
||||
model.put("client", client);
|
||||
return new ModelAndView("oauth/approve", model);
|
||||
}
|
||||
|
||||
public void setClientDetailsService(
|
||||
ClientDetailsService clientDetailsService) {
|
||||
this.clientDetailsService = clientDetailsService;
|
||||
}
|
||||
|
||||
public ClientDetailsService getClientDetailsService() {
|
||||
return this.clientDetailsService;
|
||||
}
|
||||
|
||||
/*
|
||||
* handle "idtoken token" flow
|
||||
*/
|
||||
|
||||
/*
|
||||
* Other flows get handled outside of our endpoints by SSOA
|
||||
*/
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package org.mitre.openid.connect.web;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("token")
|
||||
public class TokenEndpoint {
|
||||
|
||||
//Corresponds to spring security Authentication Filter class
|
||||
|
||||
// handle sending back a token and an id token for a code
|
||||
|
||||
// fall through to SSOA code if no id token?
|
||||
|
||||
}
|
Loading…
Reference in new issue