func PSUURLGenerate(claims PSUConsentClaims) (*url.URL, error) {
	token, err := createAlgNoneJWT(claims)
	if err != nil {
		return nil, fmt.Errorf("generating psu consent URL: %w", err)
	}

	consentUrl, err := url.Parse(claims.AuthorizationEndpoint)
	if err != nil {
		return nil, fmt.Errorf("generating psu consent URL: %w", err)
	}

	consentUrlQuery := consentUrl.Query()
	consentUrlQuery.Set("client_id", claims.Iss)
	consentUrlQuery.Set("response_type", claims.ResponseType)
	consentUrlQuery.Set("scope", claims.Scope)
	consentUrlQuery.Set("request", token)
	consentUrlQuery.Set("state", claims.State)
	consentUrl.RawQuery = consentUrlQuery.Encode()

	return consentUrl, nil
}
// PSUURLGenerate generates a PSU Consent URL based on claims
PSUURLGenerate generates a PSU Consent URL based on claims
// PSUURLGenerate generates a PSU Consent URL based on claims
func PSUURLGenerate(claims PSUConsentClaims) (*url.URL, error) {
	token, err := createAlgNoneJWT(claims)
	if err != nil {
		return nil, fmt.Errorf("generating psu consent URL: %w", err)
	}
	consentUrl, err := url.Parse(claims.AuthorizationEndpoint)
	if err != nil {
		return nil, fmt.Errorf("generating psu consent URL: %w", err)
	}
	consentUrlQuery := consentUrl.Query()
	consentUrlQuery.Set("client_id", claims.Iss)
	consentUrlQuery.Set("response_type", claims.ResponseType)
	consentUrlQuery.Set("scope", claims.Scope)
	consentUrlQuery.Set("request", token)
	consentUrlQuery.Set("state", claims.State)
	consentUrl.RawQuery = consentUrlQuery.Encode()
	return consentUrl, nil
}
func PSUURLGenerate ( claims PSUConsentClaims ) ( * url . URL , error ) { token , err := createAlgNoneJWT ( claims ) if err != nil { return nil , fmt . Errorf ( " " , err ) } consentUrl , err := url . Parse ( claims . AuthorizationEndpoint ) if err != nil { return nil , fmt . Errorf ( " " , err ) } consentUrlQuery := consentUrl . Query ( ) consentUrlQuery . Set ( " " , claims . Iss ) consentUrlQuery . Set ( " " , claims . ResponseType ) consentUrlQuery . Set ( " " , claims . Scope ) consentUrlQuery . Set ( " " , token ) consentUrlQuery . Set ( " " , claims . State ) consentUrl . RawQuery = consentUrlQuery . Encode ( ) return consentUrl , nil }
PSUURLGenerate generates a PSU Consent URL based on claims
PSUURLGenerate generates a PSU Consent URL based on claims