コード例 #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
}
コード例 #2
0
ファイル: target.go プロジェクト: toliaqat/photon-controller
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
}