SetupResources configures the client to use the specified settings and diescopers the UAA and Authentication resources
(uaaURL string, loginURL string)
| 6 | |
| 7 | // SetupResources configures the client to use the specified settings and diescopers the UAA and Authentication resources |
| 8 | func (client *Client) SetupResources(uaaURL string, loginURL string) error { |
| 9 | info := NewInfo(uaaURL, loginURL) |
| 10 | |
| 11 | resources := map[string]string{ |
| 12 | "uaa": uaaURL, |
| 13 | "authorization_endpoint": loginURL, |
| 14 | } |
| 15 | |
| 16 | client.router = internal.NewRouter(internal.APIRoutes, resources) |
| 17 | client.Info = info |
| 18 | |
| 19 | client.config.SetUAAEndpoint(uaaURL) |
| 20 | |
| 21 | return nil |
| 22 | } |