Esempio n. 1
0
func (api *AuthAPI) buildOIDCClient() (client *lightwave.OIDCClient, err error) {
	authEndPoint, err := api.getAuthEndpoint()
	if err != nil {
		return
	}

	return lightwave.NewOIDCClient(
		authEndPoint,
		api.buildOIDCClientOptions(&api.client.options),
		api.client.restClient.logger), nil
}
Esempio n. 2
0
func setupLightWaveCerts(host string, isNonInterractive bool) (err error) {
	err = verifyServerTrust("Authentication", host, isNonInterractive)
	if err != nil {
		return
	}

	oidcClient := lightwave.NewOIDCClient(fmt.Sprintf("https://%s", host), nil, nil)
	certs, err := oidcClient.GetRootCerts()
	if err != nil {
		return
	}

	for _, cert := range certs {
		err = processCert(cert, "Authentication", host)
		if err != nil {
			return
		}
	}

	return
}