added reference to abstract endpoint class to get token granter

pull/166/merge
Mike Derryberry 12 years ago committed by Justin Richer
parent 2bdbb283b7
commit 36b9c805d9

@ -34,6 +34,7 @@ import org.springframework.security.oauth2.provider.approval.UserApprovalHandler
import org.springframework.security.oauth2.provider.code.AuthorizationCodeServices; import org.springframework.security.oauth2.provider.code.AuthorizationCodeServices;
import org.springframework.security.oauth2.provider.code.AuthorizationRequestHolder; import org.springframework.security.oauth2.provider.code.AuthorizationRequestHolder;
import org.springframework.security.oauth2.provider.code.InMemoryAuthorizationCodeServices; import org.springframework.security.oauth2.provider.code.InMemoryAuthorizationCodeServices;
import org.springframework.security.oauth2.provider.endpoint.AbstractEndpoint;
import org.springframework.security.oauth2.provider.endpoint.DefaultRedirectResolver; import org.springframework.security.oauth2.provider.endpoint.DefaultRedirectResolver;
import org.springframework.security.oauth2.provider.endpoint.RedirectResolver; import org.springframework.security.oauth2.provider.endpoint.RedirectResolver;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -52,7 +53,7 @@ import org.springframework.web.servlet.view.RedirectView;
@Controller @Controller
@SessionAttributes(types = AuthorizationRequest.class) @SessionAttributes(types = AuthorizationRequest.class)
@RequestMapping(value = "/oauth/authorize") @RequestMapping(value = "/oauth/authorize")
public class AuthorizationEndpointRequestObject implements InitializingBean{ public class AuthorizationEndpointRequestObject extends AbstractEndpoint implements InitializingBean{
@Autowired @Autowired
private TokenGranter tokenGranter; private TokenGranter tokenGranter;
@ -402,14 +403,10 @@ public class AuthorizationEndpointRequestObject implements InitializingBean{
return url.toString(); return url.toString();
} }
public TokenGranter getTokenGranter() { //
return tokenGranter; // TODO: Remove when possible
} // COPIED FROM SECOAUTH AbstractEndpoint
//
public void setTokenGranter(TokenGranter tokenGranter) {
this.tokenGranter = tokenGranter;
}
@Override @Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
Assert.state(tokenGranter != null, "TokenGranter must be provided"); Assert.state(tokenGranter != null, "TokenGranter must be provided");

Loading…
Cancel
Save