Announcement Announcement Module
Collapse
No announcement yet.
Is there any sample for seperating resource and authorization server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there any sample for seperating resource and authorization server

    I find a sample (tonr/sparklr) base oauth2,but it doesn't seperate resource and authorization server,and I am failed to try seperate it.So my question is
    1. Is there any samples which hae seperated resource and authorization server?
    2. How to seperate resource and authorization server for the sample (tonr/sparklr)
    Any help will be gratefully appreciated.Thx!

  • #2
    I have seperated resource and authorization for sparklr2,
    but resource and authorization server share with the same database
    so I have one question, can authorization and resource have own database,
    if does,how to set.
    I can't find where set the token storing for resource server.

    Comment


    • #3
      Originally posted by acpb View Post
      so I have one question, can authorization and resource have own database,
      If you mean for the TokenStore, then the answer is "maybe". It's probably easiest to get started that way, but another option (for example) is to expose an endpoint on the auth server that resource servers can use to decode tokens (e.g. see https://github.com/cloudfoundry/uaa/...ervlet.xml#L68).

      I can't find where set the token storing for resource server.
      You just need to set up a TokenServices that points to the shared database. Example:

      Code:
      <bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.DefaultTokenServices">
      	<property name="supportRefreshToken" value="true" />
      	<property name="tokenStore" ref="tokenStore" />
      	<property name="clientDetailsService" ref="clientDetailsService" />
      </bean>

      Comment


      • #4
        thank you very much.
        the second method that set up a tokenservices I have done ,and success.
        but the first method which used RemoteTokenServices ,I met some trouble.
        Code:
        <bean id="tokenServices" class="org.cloudfoundry.identity.uaa.oauth.RemoteTokenServices">		
        <property name="checkTokenEndpointUrl" value="${checkTokenEndpointUrl}" />		
        <property name="clientId" value="app" />		
        <property name="clientSecret" value="appclientsecret" />	
        </bean>
        what is "checkTokenEndpointUrl",for example (tonr2/sparklr2),what value should I put? could you enlighten me on this subject
        thank you again.
        Last edited by acpb; Jan 31st, 2013, 07:28 AM.

        Comment


        • #5
          Sparklr doesn't have a check_token endpoint (it's a UAA feature), but you can add one pretty easily. If you want to use it we could add it (optionally) to the framework - didn't do that up to now because it's not in the spec, but if it's useful it's easy to add. Please follow the guidelines for contributions in the README.

          Comment

          Working...
          X