All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.edc.iam.identitytrust.spi.CredentialServiceClient Maven / Gradle / Ivy

There is a newer version: 0.9.1
Show newest version
/*
 *  Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
 *
 *  This program and the accompanying materials are made available under the
 *  terms of the Apache License, Version 2.0 which is available at
 *  https://www.apache.org/licenses/LICENSE-2.0
 *
 *  SPDX-License-Identifier: Apache-2.0
 *
 *  Contributors:
 *       Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
 *
 */

package org.eclipse.edc.iam.identitytrust.spi;

import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiablePresentationContainer;
import org.eclipse.edc.spi.result.Result;

import java.util.List;

/**
 * This interface gives access to the REST API of a CredentialService
 */
public interface CredentialServiceClient {
    /**
     * Sends a presentation request
     * to the specified credential service.
     * 

* The CredentialService will return 401/403 error codes if either the SI Token is not authorized, if the scopes don't match or if no scopes are provided. *

* Note that sending a DIF Presentation Definition is not supported yet and will result in a 5xx error. * * @param credentialServiceUrl The URL of the credentialService from which the VP is to be requested * @param siTokenJwt A Self-Issued ID token in JWT format, that contains the access_token * @param scopes A list of strings, each containing a scope definition * @return A list of {@link VerifiablePresentationContainer} objects, or a failure if the request was unsuccessful. */ Result> requestPresentation(String credentialServiceUrl, String siTokenJwt, List scopes); //todo: add write api? }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy