Results 1 to 7 of 7

Thread: Spring OAuth2 M5 can't set passwordEncoder of TokenGranter(s)

  1. #1

    Default Spring OAuth2 M5 can't set passwordEncoder of TokenGranter(s)

    Hi,

    Just wondering why there is no setters for the passwordEncoder of

    org.springframework.security.oauth2.common.OAuth2A ccessToken.ClientCredentialsTokenGranter

    Thanks

  2. #2

    Default

    I have found another similar issue. I may be missing something...but I am also wondering how to set the
    resourceId of org.springframework.security.oauth2.provider.filte r.OAuth2ProtectedResourceFilter

    because the following code throws exception
    Code:
    				Collection<String> resourceIds = auth.getClientAuthentication().getResourceIds();
    				if (resourceIds!=null && !resourceIds.isEmpty() && !resourceIds.contains(resourceId)) {
    					throw new InvalidTokenException("Invalid token does not contain resource id ("+resourceId+"): " + token);					
    				}

  3. #3

    Default

    not wondering with my last question.....not sure how I have missed the obvious...just setting the property...

    Code:
    	<beans:bean id="oauth2ProtectedResourceFilter" class="org.springframework.security.oauth2.provider.filter.OAuth2ProtectedResourceFilter">
    	   <beans:property name="tokenServices" ref="tokenServices"/>
    	   <beans:property name="resourceId" value="userManagementResource"/>
    	</beans:bean>

  4. #4
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    Quote Originally Posted by asheikh View Post
    Just wondering why there is no setters for the passwordEncoder of
    org.springframework.security.oauth2.common.OAuth2A ccessToken.ClientCredentialsTokenGranter
    I guess it wasn't implemented yet - ClientCredentialsTokenGranter is a fairly new feature. You can raise a JIRA ticket, and/or make a pull request (read the README to get the process steps).

  5. #5

    Default

    Thanks Dave, I see that you have raised the bug https://jira.springsource.org/browse/SECOAUTH-171
    I would try to make a pull request....

    Thanks,

  6. #6
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    Too late with the pull request I think, unless you can see issues with the code I added. I forgot to resolve the issue, but the snapshots from end of last week should have the new attribute.

  7. #7

    Default

    No problem,

    Thanks Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •