package be.iminds.ilabt.jfed.lowlevel;

import be.iminds.ilabt.jfed.util.GeniUrn;

import javax.annotation.Nonnull;
import java.security.PublicKey;
import java.security.cert.X509Certificate;
import java.util.List;

/**
 * This extension adds info on who the user speaks for, if any.
 */
public interface GeniUserWithSpeaksFor extends GeniUser {
    @Nonnull
    List<AnyCredential> getSpeaksForCredentials();

    /**
     * @return the URN of the user spoken for.
     */
    @Nonnull
    GeniUrn getSpeaksForUrn();

    /**
     * @return the X509 certificate of the user spoken for.
     */
    @Nonnull
    List<X509Certificate> getSpeaksForUserCertificateChain();

    /**
     * @return the public key of the user spoken for.
     */
    @Nonnull
    PublicKey getSpeaksForUserPublicKey();
}
