github.com/lukasheimann/cloudfoundrycli@v7.1.0+incompatible/api/uaa/config.go (about)

     1  package uaa
     2  
     3  import "time"
     4  
     5  //go:generate counterfeiter . Config
     6  
     7  // Config allows the Client to be configured
     8  type Config interface {
     9  	// BinaryName is the name of the application/process using the client.
    10  	BinaryName() string
    11  
    12  	// BinaryVersion is the version of the application/process using the client.
    13  	BinaryVersion() string
    14  
    15  	// DialTimeout is the DNS lookup timeout for the client. If not set, it is
    16  	// infinite.
    17  	DialTimeout() time.Duration
    18  
    19  	// SetUAAEndpoint sets the UAA endpoint that is obtained from hitting
    20  	// <AuthorizationEndpoint>/login.
    21  	SetUAAEndpoint(uaaEndpoint string)
    22  
    23  	// SkipSSLValidation controls whether a client verifies the server's
    24  	// certificate chain and host name. If SkipSSLValidation is true, TLS accepts
    25  	// any certificate presented by the server and any host name in that
    26  	// certificate for *all* client requests going forward.
    27  	//
    28  	// In this mode, TLS is susceptible to man-in-the-middle attacks. This should
    29  	// be used only for testing.
    30  	SkipSSLValidation() bool
    31  
    32  	// UAADisableKeepAlives controls whether the UAA client will reuse TCP connections
    33  	// for multiple requests. If true, the client will always use a new TCP request
    34  	// and set Connection: close in the request header. If false, the client
    35  	// will reuse the TCP connection.
    36  	UAADisableKeepAlives() bool
    37  
    38  	// UAAGrantType returns the grant type of the supplied UAA credentials.
    39  	UAAGrantType() string
    40  
    41  	// UAAOAuthClient is the UAA client ID the client will use.
    42  	UAAOAuthClient() string
    43  
    44  	// UAAOAuthClientSecret is the UAA client secret the client will use.
    45  	UAAOAuthClientSecret() string
    46  }