diff --git a/interfaces/auth.go b/interfaces/auth.go index 836ba0cf95d56d58151b5d99c6dd72cc4a12538f..04751e8964a7132f66da2a956554051fc74cddbe 100644 --- a/interfaces/auth.go +++ b/interfaces/auth.go @@ -1,35 +1,38 @@ package interfaces import ( - "gitlab.com/elixxir/client/auth" + "gitlab.com/elixxir/client/interfaces/contact" "gitlab.com/xx_network/primitives/id" ) +type RequestCallback func(requestor contact.Contact, message string) +type ConfirmCallback func(partner contact.Contact) + type Auth interface { // Adds a general callback to be used on auth requests. This will be preempted // by any specific callback - AddGeneralRequestCallback(cb auth.RequestCallback) + AddGeneralRequestCallback(cb RequestCallback) // Adds a general callback to be used on auth requests. This will not be // preempted by any specific callback. It is recommended that the specific // callbacks are used, this is primarily for debugging. - AddOverrideRequestCallback(cb auth.RequestCallback) + AddOverrideRequestCallback(cb RequestCallback) // Adds a specific callback to be used on auth requests. This will preempt a // general callback, meaning the request will be heard on this callback and not // the general. Request will still be heard on override callbacks. - AddSpecificRequestCallback(id *id.ID, cb auth.RequestCallback) + AddSpecificRequestCallback(id *id.ID, cb RequestCallback) // Removes a specific callback to be used on auth requests. RemoveSpecificRequestCallback(id *id.ID) // Adds a general callback to be used on auth confirms. This will be preempted // by any specific callback - AddGeneralConfirmCallback(cb auth.ConfirmCallback) + AddGeneralConfirmCallback(cb ConfirmCallback) // Adds a general callback to be used on auth confirms. This will not be // preempted by any specific callback. It is recommended that the specific // callbacks are used, this is primarily for debugging. - AddOverrideConfirmCallback(cb auth.ConfirmCallback) + AddOverrideConfirmCallback(cb ConfirmCallback) // Adds a specific callback to be used on auth confirms. This will preempt a // general callback, meaning the request will be heard on this callback and not // the general. Request will still be heard on override callbacks. - AddSpecificConfirmCallback(id *id.ID, cb auth.ConfirmCallback) + AddSpecificConfirmCallback(id *id.ID, cb ConfirmCallback) // Removes a specific callback to be used on auth confirm. RemoveSpecificConfirmCallback(id *id.ID) }