github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/uaa/resources.go (about)

     1  package uaa
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/api/uaa/internal"
     5  )
     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  }