public interface AuthorityService
限定符和类型 | 方法和说明 |
---|---|
UserToken |
authenticate(String userName,
String password)
使用用户名和密码进行身份验证。
|
UserToken |
getUserToken(String userName,
String password) |
UserToken authenticate(String userName, String password) throws ServiceException
userName
- 服务用户名password
- 服务用户密码示例:
AuthorityServiceStub.Authenticate req=new AuthorityServiceStub.Authenticate();
req.setUserName("service-admin");
req.setPassword("123456");
AuthorityServiceStub stub = new AuthorityServiceStub();
AuthorityServiceStub.AuthenticateResponse resp = stub.authenticate(req);
AuthorityServiceStub.UserToken token = resp.get_return();
if(token.getId()!=-1)
{
}
import com.seeyon.v3x.services.AuthorityService;
import com.seeyon.v3x.services.impl.AuthorityServiceImpl;
import com.seeyon.v3x.services.UserToken;
...
AuthorityService service = new AuthorityServiceImpl();
UserToken token = service.authenticate(userName,password);
ServiceException
Copyright © 2016–2017. All rights reserved.