michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIObserver.idl" michael@0: #include "nsIPKCS11Slot.idl" michael@0: michael@0: /** michael@0: * nsIProtectedAuthThread michael@0: * This is used to communicate with the thread login on to michael@0: * a token with CKF_PROTECTED_AUTHENTICATION_PATH set. michael@0: */ michael@0: [scriptable, uuid(4bb27cb7-8984-4cee-8ce7-9b014c3d091b)] michael@0: interface nsIProtectedAuthThread : nsISupports michael@0: { michael@0: /** michael@0: * login - run the thread michael@0: * A user interface implementing this interface needs to michael@0: * call this method as soon as the message to the user is michael@0: * displayed. This will trigger login operation. No user michael@0: * cancellation is possible during login operation. michael@0: * michael@0: * When the login is done, the observe method of @observer will michael@0: * be called on the UI thread with a topic of "login-finished" michael@0: * and null data and subject. michael@0: */ michael@0: void login(in nsIObserver observer); michael@0: michael@0: /** michael@0: * The PKCS11 slot michael@0: */ michael@0: readonly attribute nsIPKCS11Slot slot; michael@0: michael@0: /** michael@0: * Gets token to be logged in name. michael@0: */ michael@0: AString getTokenName(); michael@0: }; michael@0: michael@0: %{ C++ michael@0: // {45334489-3D30-47c6-920B-0A55A313AEBF} michael@0: #define NS_PROTECTEDAUTHTHREAD_CID \ michael@0: { 0x45334489, 0x3d30, 0x47c6, { 0x92, 0x0b, 0x0a, 0x55, 0xa3, 0x13, 0xae, 0xbf } } michael@0: #define NS_PROTECTEDAUTHTHREAD_CONTRACTID "@mozilla.org/security/protectedauththread;1" michael@0: %}