func GetKID(ctx ContextInterface, modulus []byte) (string, error) {
	modulusBase64 := base64.RawURLEncoding.EncodeToString(modulus)
	kid, err := CalcKid(modulusBase64)
	if err != nil {
		return "", fmt.Errorf("authentication.GetKID: CalcKid(modulusBase64) failed: %w", err)
	}
	nonOBDirectory, exists := ctx.Get("nonOBDirectoryTPP")
	if !exists {
		return "", errors.New("authentication.GetKID: unable get nonOBDirectory value from context")
	}
	nonOBDirectoryAsBool, ok := nonOBDirectory.(bool)
	if !ok {
		return "", errors.New("authentication.GetKID: unable to cast nonOBDirectory value to bool")
	}
	if nonOBDirectoryAsBool {
		kid, err = ctx.GetString("signingKid")
		if err != nil {
			return "", fmt.Errorf("authentication.GetKID: unable to retrieve signingKid from context: %w", err)
		}
	}

	return kid, nil
}
// GetKID determines the value of the JWS Key ID
GetKID determines the value of the JWS Key ID
// GetKID determines the value of the JWS Key ID
func GetKID(ctx ContextInterface, modulus []byte) (string, error) {
	modulusBase64 := base64.RawURLEncoding.EncodeToString(modulus)
	kid, err := CalcKid(modulusBase64)
	if err != nil {
		return "", fmt.Errorf("authentication.GetKID: CalcKid(modulusBase64) failed: %w", err)
	}
	nonOBDirectory, exists := ctx.Get("nonOBDirectoryTPP")
	if !exists {
		return "", errors.New("authentication.GetKID: unable get nonOBDirectory value from context")
	}
	nonOBDirectoryAsBool, ok := nonOBDirectory.(bool)
	if !ok {
		return "", errors.New("authentication.GetKID: unable to cast nonOBDirectory value to bool")
	}
	if nonOBDirectoryAsBool {
		kid, err = ctx.GetString("signingKid")
		if err != nil {
			return "", fmt.Errorf("authentication.GetKID: unable to retrieve signingKid from context: %w", err)
		}
	}
	return kid, nil
}
func GetKID ( ctx ContextInterface , modulus [ ] byte ) ( string , error ) { modulusBase64 := base64 . RawURLEncoding . EncodeToString ( modulus ) kid , err := CalcKid ( modulusBase64 ) if err != nil { return " " , fmt . Errorf ( " " , err ) } nonOBDirectory , exists := ctx . Get ( " " ) if ! exists { return " " , errors . New ( " " ) } nonOBDirectoryAsBool , ok := nonOBDirectory . ( bool ) if ! ok { return " " , errors . New ( " " ) } if nonOBDirectoryAsBool { kid , err = ctx . GetString ( " " ) if err != nil { return " " , fmt . Errorf ( " " , err ) } } return kid , nil }
GetKID determines the value of the JWS Key ID
GetKID determines the value of the JWS Key ID