1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/public/nsIPK11Token.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,59 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +[scriptable, uuid(51191434-1dd2-11b2-a17c-e49c4e99a4e3)] 1.13 +interface nsIPK11Token : nsISupports 1.14 +{ 1.15 + const long ASK_EVERY_TIME = -1; 1.16 + const long ASK_FIRST_TIME = 0; 1.17 + const long ASK_EXPIRE_TIME = 1; 1.18 + 1.19 + /* 1.20 + * The name of the token 1.21 + */ 1.22 + readonly attribute wstring tokenName; 1.23 + 1.24 + readonly attribute wstring tokenLabel; 1.25 + readonly attribute wstring tokenManID; 1.26 + readonly attribute wstring tokenHWVersion; 1.27 + readonly attribute wstring tokenFWVersion; 1.28 + readonly attribute wstring tokenSerialNumber; 1.29 + 1.30 + /* 1.31 + * Login information 1.32 + */ 1.33 + boolean isLoggedIn(); 1.34 + void login(in boolean force); 1.35 + void logoutSimple(); 1.36 + void logoutAndDropAuthenticatedResources(); 1.37 + 1.38 + /* 1.39 + * Reset password 1.40 + */ 1.41 + void reset(); 1.42 + 1.43 + /* 1.44 + * Password information 1.45 + */ 1.46 + readonly attribute long minimumPasswordLength; 1.47 + readonly attribute boolean needsUserInit; 1.48 + boolean checkPassword(in wstring password); /* Logs out if check fails */ 1.49 + void initPassword(in wstring initialPassword); 1.50 + void changePassword(in wstring oldPassword, in wstring newPassword); 1.51 + long getAskPasswordTimes(); 1.52 + long getAskPasswordTimeout(); 1.53 + void setAskPasswordDefaults([const] in long askTimes, [const] in long timeout); 1.54 + 1.55 + /* 1.56 + * Other attributes 1.57 + */ 1.58 + boolean isHardwareToken(); 1.59 + boolean needsLogin(); 1.60 + boolean isFriendly(); 1.61 +}; 1.62 +