/functionList 获取应用功能权限清单

This commit is contained in:
MaxKey
2025-04-29 07:40:37 +08:00
parent ca2832d4e2
commit 672fdce0bc
19 changed files with 720 additions and 8 deletions
@@ -25,8 +25,11 @@ import org.dromara.maxkey.authn.SignPrincipal;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
public class AuthJwt implements Serializable {
private static final long serialVersionUID = -914373258878811144L;
@@ -48,6 +51,10 @@ public class AuthJwt implements Serializable {
@JsonProperty(EXPIRES_IN)
private int expiresIn;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(name = "twoFactor", description = "二次认证类型")
int twoFactor;
private String remeberMe;
private String id;
@@ -98,7 +105,7 @@ public class AuthJwt implements Serializable {
this.instId = principal.getUserInfo().getInstId();
this.instName = principal.getUserInfo().getInstName();
this.authorities = new ArrayList<String>();
this.authorities = new ArrayList<>();
for(GrantedAuthority grantedAuthority :authentication.getAuthorities()) {
this.authorities.add(grantedAuthority.getAuthority());
}
@@ -1,3 +1,20 @@
/*
* Copyright [2025] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.maxkey.authn.web;
import java.util.Date;