[webservice(name="iapplicationmanager",
namespace="http://credentialsservices",
description="iapplicationmanager is used to manage 
applications. this web service is only 
the definition of the interface. you 
cannot invoke method calls on it.")]
abstract class iapplicationmanagershim : iapplicationmanager{
 public abstract void deleteapplication(string application);
 public abstract string[] getapplications();
 public abstract void deleteallapplications();
} 
<%@ webservice language="c#" 
codebehind="~/app_code/iapplicationmanagershim.cs"
class="iapplicationmanagershim"%>
[webservicebinding("irolemanager")]
interface irolemanager{
[webmethod(...)]
void createrole(string application,string role);
[webmethod(...)]
bool deleterole(string application,string role,bool throwonpopulatedrole);
[webmethod(...)]
void addusertorole(string application,string username, string role);
[webmethod(...)]
void deleteallroles(string application,bool throwonpopulatedrole);
[webmethod(...)]
string[] getallroles(string application);
[webmethod(...)]
string[] getrolesforuser(string application,string username);
[webmethod(...)]
string[] getusersinrole(string application, string role);
[webmethod(...)]
void removeuserfromrole(string application,string username, string rolename);
//更多成員
}
[webservicebinding("ipasswordmanager")]
interface ipasswordmanager{
[webmethod(...)]
bool enablepasswordreset(string application);
[webmethod(...)]
bool enablepasswordretrieval(string application);
[webmethod(...)]
string generatepassword(string application,int length,
int numberofnonalphanumericcharacters);
[webmethod(...)]
bool requiresquestionandanswer(string application);
[webmethod(...)]
string resetpassword(string application,string username);
[webmethod(...)]
string getpassword(string application,string username,string passwordanswer);
[webmethod(...)]
void changepassword(string application,string username,string newpassword);
//更多成員
} 
  典型地,該策略存儲在應用程序的配置文件中。該策略包括是否啟動口令重置和檢索,口令強度和口令回答策略等。你也可以使用ipasswordmanager來生成一相應于該口令強度策略的新口令。另外,ipasswordmanager可用于重置、改變或檢索一指定用戶的口令。
  (五) iusermanager
  iusermanager接口允許校驗用戶憑證,檢索角色身份以及獲取指定用戶是其成員之一的所有角色。該接口用于測試和分析目的。 
[webservicebinding("iusermanager")]
public interface iusermanager{
[webmethod(...)]
bool authenticate(string applicationname,string username, string password);
[webmethod(...)]
bool isinrole(string applicationname,string username, string role);
[webmethod(...)]
string[] getroles(string applicationname,string username);
}
新聞熱點
疑難解答
圖片精選