S
S
ScRsa2016-06-19 08:49:21
Java
ScRsa, 2016-06-19 08:49:21

How to force the application to take the address of the authorization server from the discovery service?

I'm trying to parse the Spring Security example ( https://github.com/spring-guides/tut-spring-securi... The address of the authorization server is hardcoded in the settings:

security:
  oauth2:
    client:
      accessTokenUri: http://localhost:9999/uaa/oauth/token
      userAuthorizationUri: http://localhost:9999/uaa/oauth/authorize

Tell me, is it possible to somehow take this address from the discovery service? The service is registered with Consul with the name auth-service, but how do you force the application to use this "alias"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ScRsa, 2016-06-19
@ScRsa

Looks like here is the solution:
https://github.com/spring-cloud/spring-cloud-secur...
https://github.com/kakawait/uaa-behind-zuul-sample

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question