feat:微信认证退出接口完成

This commit is contained in:
haoxr 2020-10-13 14:15:16 +08:00
parent 2e4fdf551c
commit af34d2d81b
9 changed files with 20 additions and 13 deletions

View File

@ -5,7 +5,7 @@ import lombok.Data;
@Data @Data
public class MemberDTO { public class MemberDTO {
private Integer id; private Long id;
private String username; private String username;
private String password; private String password;
private Integer status; private Integer status;

View File

@ -11,8 +11,6 @@ import java.time.LocalDate;
@Accessors(chain = true) @Accessors(chain = true)
public class UmsMember { public class UmsMember {
private Long id; private Long id;
private String username; private String username;

View File

@ -0,0 +1,14 @@
package com.youlai.mall.ums.api.vo;
import lombok.Data;
@Data
public class MemberVO {
private String nickname;
private String avatar;
}

View File

@ -9,7 +9,7 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
public class UserDTO { public class UserDTO {
private Integer id; private Long id;
private String username; private String username;
private String password; private String password;
private Integer status; private Integer status;

View File

@ -10,7 +10,7 @@ import lombok.Data;
public class SysUser extends BaseEntity { public class SysUser extends BaseEntity {
@TableId @TableId
private Integer id; private Long id;
private String username; private String username;
@ -24,8 +24,6 @@ public class SysUser extends BaseEntity {
private String password; private String password;
private String salt;
private Integer status; private Integer status;
private Integer deptId; private Integer deptId;

View File

@ -5,7 +5,7 @@ import lombok.Data;
@Data @Data
public class SysUserRole { public class SysUserRole {
private Integer userId; private Long userId;
private Integer roleId; private Integer roleId;

View File

@ -19,7 +19,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
http http
.authorizeRequests().requestMatchers(EndpointRequest.toAnyEndpoint()).permitAll() .authorizeRequests().requestMatchers(EndpointRequest.toAnyEndpoint()).permitAll()
.and() .and()
.authorizeRequests().antMatchers("/rsa/publicKey").permitAll().anyRequest().authenticated() .authorizeRequests().antMatchers("/rsa/publicKey","/oauth/logout").permitAll().anyRequest().authenticated()
.and() .and()
.csrf().disable(); .csrf().disable();
} }

View File

@ -88,8 +88,6 @@ public class AuthController {
return Result.success(oauth2Token); return Result.success(oauth2Token);
} }
@DeleteMapping("/logout") @DeleteMapping("/logout")
public Result logout(HttpServletRequest request) { public Result logout(HttpServletRequest request) {
String payload = request.getHeader(AuthConstants.JWT_PAYLOAD_KEY); String payload = request.getHeader(AuthConstants.JWT_PAYLOAD_KEY);
@ -107,7 +105,6 @@ public class AuthController {
return Result.success(); return Result.success();
} }
private Result handleForWxAppAuth(Principal principal, Map<String, String> parameters) throws WxErrorException, HttpRequestMethodNotSupportedException { private Result handleForWxAppAuth(Principal principal, Map<String, String> parameters) throws WxErrorException, HttpRequestMethodNotSupportedException {
String code = parameters.get("code"); String code = parameters.get("code");

View File

@ -20,7 +20,7 @@ import java.util.Collection;
@NoArgsConstructor @NoArgsConstructor
public class User implements UserDetails { public class User implements UserDetails {
private Integer id; private Long id;
private String username; private String username;