blob: d43ed7477b079f80110d29cc4c29ee0231149a74 [file] [log] [blame]
Andres Erbsen975c8832014-06-18 12:06:07 -07001package security
2
Jiri Simsa764efb72014-12-25 20:57:03 -08003import "v.io/core/veyron2/security"
Andres Erbsen975c8832014-06-18 12:06:07 -07004
Asim Shankara94e5072014-08-19 18:18:36 -07005// Discharger is the interface for obtaining discharges for ThirdPartyCaveats.
Andres Erbsen975c8832014-06-18 12:06:07 -07006type Discharger interface {
7 // Discharge is called by a principal that holds a blessing with a third
8 // party caveat and seeks to get a discharge that proves the fulfillment of
9 // this caveat.
Asim Shankara94e5072014-08-19 18:18:36 -070010 //
Ankurf044a8d2014-09-05 17:05:24 -070011 // Caveat and Discharge are of type ThirdPartyCaveat and Discharge
Andres Erbsen975c8832014-06-18 12:06:07 -070012 // respectively. (not enforced here because vdl does not know these types)
13 // TODO(ataly,ashankar): Figure out a VDL representation for ThirdPartyCaveat
14 // and Discharge and use those here?
Todd Wang383e88c2014-12-18 01:52:34 -080015 Discharge(Caveat any, Impetus security.DischargeImpetus) (Discharge any | error)
Andres Erbsen975c8832014-06-18 12:06:07 -070016}