Spring Cloud authentication with JWT service
2017-08-23 00:13
393 查看
@RequestMapping(value = "/authenticate", method = RequestMethod.POST) public ResponseEntity<AuthTokenDTO> authenticate(@Valid @RequestBody AuthenticationDTO authenticationDTO) { User user = userManagementService.authenticateUser( authenticationDTO.getEmail(), authenticationDTO.getPassword()); if (user != null) { return new ResponseEntity<>(buildAuthenticationTokenFromUser(user), HttpStatus.OK); } else { return new ResponseEntity<>(HttpStatus.UNAUTHORIZED); } }
https://github.com/vdubois/spring-cloud-sample-authentication-service/blob/a442f7a10bf9529dbb68b669ed394fed51fcc330/src/main/java/io/github/vdubois/controller/AuthenticationController.java
相关文章推荐
- A Microservice Architecture with Spring Boot and Spring Cloud(二)
- Spring Cloud ZooKeeper集成Feign的坑2,服务调用了一次后第二次调用就变成了500,错误:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.n
- JWT Authentication Tutorial: An example using Spring Boot--转
- Spring JMS with Azure Service Bus
- 一起来学SpringCloud之 - 服务认证(JWT)
- (七)整合spring cloud云服务架构 - HongHu common-service 项目构建过程
- spring cloud架构 - HongHu common-service 项目构建过程
- How to use JDBC-Authentication of Spring Boot/Spring Security with Flyway
- spring cloud云服务架构 - HongHu commonservice-eureka 项目
- Trouble shooting with Cloud Service publishing error.
- Invoke WCF service from Java Client with Authentication (X.509 Certificate) Java 客户端调用WCF服务 需要安全验证
- Web API 2 authentication with JWT
- springcloud(第七篇)springcloud ribbon with eureka
- Build self-healing distributed systems with Spring Cloud
- Spring Cloud云服务架构 - common-service 项目构建过程
- cxf-Writing a service with Spring
- Servlet.service() for servlet [spring] in context with path [] threw exception [Request processing f
- JWT如何在Spring Cloud微服务系统中在服务相互调时传递
- CXF(2.7.10) - Writing a service with Spring
- spring cloud放弃系列之--5-jwt