Announcement Announcement Module
Collapse
No announcement yet.
Spring OAuth2 M5 can't set passwordEncoder of TokenGranter(s) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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);					
    				}

    Comment


    • #3
      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>

      Comment


      • #4
        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).

        Comment


        • #5
          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,

          Comment


          • #6
            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.

            Comment


            • #7
              No problem,

              Thanks Dave

              Comment

              Working...
              X