public ClientDetails loadClientByClientId(String id) throws ClientRegistrationException {
if (CurrentAuthenticatedClientContext.hasAuthenticatedClient()) {
AuthenticatedClient client = CurrentAuthenticatedClientContext.getAuthenticatedClient();
if (client.getClientId().equals(id)) {
return CurrentAuthenticatedClientContext.getAuthenticatedClient();
}
CurrentAuthenticatedClientContext.clear();
}
Result<Client> result = clientService.findByClientId(id);
if (result.rejected()) {
CurrentAuthenticatedClientContext.clear();
throw new UsernameNotFoundException("Could not find client with client id " + id);
}
return CurrentAuthenticatedClientContext.setAuthenticatedClient(new AuthenticatedClient(result.getInstance()));
}
ClientAuthenticationServiceImpl.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:tokamak
作者:
评论列表
文章目录