Results 1 to 5 of 5

Thread: Is there any sample for seperating resource and authorization server

  1. #1
    Join Date
    Jan 2013
    Posts
    3

    Default 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. #2
    Join Date
    Jan 2013
    Posts
    3

    Default

    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.

  3. #3
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    Quote 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>

  4. #4
    Join Date
    Jan 2013
    Posts
    3

    Default

    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 at 06:28 AM.

  5. #5
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    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.

Posting Permissions

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