CMSgov/dpc-app

View on GitHub
dpc-macaroons/src/main/java/gov/cms/dpc/macaroons/MacaroonDischarger.java

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
package gov.cms.dpc.macaroons;

import com.github.nitram509.jmacaroons.Macaroon;

/**
 * Function signature for handling the discharge process of the given {@link MacaroonCaveat}
 */
@FunctionalInterface
public interface MacaroonDischarger {
    /**
     * Peform discharge operation
     *
     * @param caveat          - {@link MacaroonCaveat} to discharge
     * @param encryptedCaveat - {@link Byte} encrypted caveat body
     * @return - Discharged {@link Macaroon}
     */
    Macaroon getDischarge(MacaroonCaveat caveat, byte[] encryptedCaveat);
}