mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 13:03:43 +08:00
feat:微信认证退出接口完成
This commit is contained in:
parent
2e4fdf551c
commit
af34d2d81b
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.youlai.mall.ums.api.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class MemberVO {
|
||||||
|
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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");
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user