[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);
}
新闻热点
疑难解答
图片精选