Browse Source

Fixed ChainedTokenGranter setup

pull/340/head
Amanda Anganes 12 years ago
parent
commit
c212821267
  1. 1
      openid-connect-client/.gitignore
  2. 1
      openid-connect-server/.gitignore
  3. 6
      openid-connect-server/src/main/java/org/mitre/oauth2/token/ChainedTokenGranter.java
  4. 8
      openid-connect-server/src/main/webapp/WEB-INF/application-context.xml

1
openid-connect-client/.gitignore vendored

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

1
openid-connect-server/.gitignore vendored

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

6
openid-connect-server/src/main/java/org/mitre/oauth2/token/ChainedTokenGranter.java

@ -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;

8
openid-connect-server/src/main/webapp/WEB-INF/application-context.xml

@ -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" />

Loading…
Cancel
Save