Fixed ChainedTokenGranter setup

pull/340/head
Amanda Anganes 2013-06-24 10:14:10 -04:00
parent 530c3a75ee
commit c212821267
4 changed files with 6 additions and 10 deletions

View File

@ -8,3 +8,4 @@ bin
.project
.settings
.classpath
/target

View File

@ -8,3 +8,4 @@ bin
.project
.settings
.classpath
/target

View File

@ -10,6 +10,7 @@ import org.mitre.oauth2.model.ClientDetailsEntity;
import org.mitre.oauth2.model.OAuth2AccessTokenEntity;
import org.mitre.oauth2.service.ClientDetailsEntityService;
import org.mitre.oauth2.service.OAuth2TokenEntityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.oauth2.common.exceptions.InvalidScopeException;
import org.springframework.security.oauth2.common.exceptions.InvalidTokenException;
@ -17,6 +18,7 @@ import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.OAuth2RequestFactory;
import org.springframework.security.oauth2.provider.TokenRequest;
import org.springframework.security.oauth2.provider.token.AbstractTokenGranter;
import org.springframework.stereotype.Component;
import com.google.common.collect.Sets;
@ -24,7 +26,7 @@ import com.google.common.collect.Sets;
* @author jricher
*
*/
//@Component("chainedTokenGranter")
@Component("chainedTokenGranter")
public class ChainedTokenGranter extends AbstractTokenGranter {
private static final String grantType = "urn:ietf:params:oauth:grant_type:redelegate";
@ -39,7 +41,7 @@ public class ChainedTokenGranter extends AbstractTokenGranter {
* @param clientDetailsService
* @param grantType
*/
//@Autowired
@Autowired
public ChainedTokenGranter(OAuth2TokenEntityService tokenServices, ClientDetailsEntityService clientDetailsService, OAuth2RequestFactory requestFactory) {
super(tokenServices, clientDetailsService, requestFactory, grantType);
this.tokenServices = tokenServices;

View File

@ -120,12 +120,6 @@
</oauth:authorization-server>
<bean id="chainedTokenGranter">
<constructor-arg ref="defaultOAuth2ProviderTokenService"/>
<constructor-arg ref="defaultOAuth2ClientDetailsEntityService"/>
<constructor-arg ref="oAuth2RequestFactory"/>
</bean>
<bean id="oauthAccessDeniedHandler" class="org.springframework.security.oauth2.provider.error.OAuth2AccessDeniedHandler" />
<bean id="clientCredentialsTokenEndpointFilter" class="org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter">
@ -151,8 +145,6 @@
<constructor-arg type="int" index="3" value="0"/>
</bean>
<!-- <bean id="oAuth2RequestManager" class="org.mitre.openid.connect.ConnectOAuth2RequestFactory" /> -->
<bean id="clientAssertiontokenEndpointFilter" class="org.mitre.openid.connect.assertion.JwtBearerClientAssertionTokenEndpointFilter">
<property name="authenticationManager" ref="clientAssertionAuthenticationManager" />
<property name="filterProcessesUrl" value="/token" />