Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addCookie(HttpServletResponse, String, String, int, Cookies.CookieOptions) - Method in class tech.riemann.nif.auth.service.Cookies
-
向 HTTP 响应中添加 Cookie
- addCookie(String, String, int) - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
添加Cookie
- addExt(String, Object) - Method in class tech.riemann.nif.auth.service.AuthUser
-
添加扩展信息
- allowQueryToken() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
是否允许从 URL 查询参数中获取 Token(H10)
- allowQueryToken() - Method in class tech.riemann.nif.auth.service.impl.DefaultAuthService
-
是否允许从 URL 查询参数中获取 Token(H10)
- AND - Enum constant in enum class tech.riemann.nif.auth.aop.Auth.Logical
-
且关系 - 用户必须拥有所有指定的角色或权限
- anonymous() - Static method in class tech.riemann.nif.auth.service.AuthUser
-
创建匿名用户实例
- Auth - Annotation Interface in tech.riemann.nif.auth.aop
-
鉴权注解
- Auth.AuthType - Enum Class in tech.riemann.nif.auth.aop
-
鉴权类型枚举
- Auth.Logical - Enum Class in tech.riemann.nif.auth.aop
-
逻辑关系枚举
- authentication(List) - Method in interface tech.riemann.nif.auth.service.AuthService
-
URL鉴权验证
- authentication(List) - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
URL认证检查
- AuthenticationException - Exception Class in tech.riemann.nif.auth
-
身份验证异常
- AuthenticationException() - Constructor for exception class tech.riemann.nif.auth.AuthenticationException
-
构造默认的身份验证异常
- AuthenticationException(String) - Constructor for exception class tech.riemann.nif.auth.AuthenticationException
-
构造带消息的身份验证异常
- AuthenticationException(String, String) - Constructor for exception class tech.riemann.nif.auth.AuthenticationException
-
构造带消息和状态码的身份验证异常
- AuthorizationException - Exception Class in tech.riemann.nif.auth
-
鉴权异常(权限不足异常)
- AuthorizationException() - Constructor for exception class tech.riemann.nif.auth.AuthorizationException
-
构造默认的权限验证异常
- AuthorizationException(String) - Constructor for exception class tech.riemann.nif.auth.AuthorizationException
-
构造带消息的权限验证异常
- AuthorizationException(String, String) - Constructor for exception class tech.riemann.nif.auth.AuthorizationException
-
构造带消息和状态码的权限验证异常
- authorizationHeaderKey() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取认证Header的Key
- AuthService - Interface in tech.riemann.nif.auth.service
-
认证服务接口
- AuthUser - Class in tech.riemann.nif.auth.service
-
认证用户信息类
- AuthUser() - Constructor for class tech.riemann.nif.auth.service.AuthUser
- AuthUser.Sex - Enum Class in tech.riemann.nif.auth.service
-
性别枚举
C
- check(String, String, String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
Deprecated.
- CookieOptions() - Constructor for class tech.riemann.nif.auth.service.Cookies.CookieOptions
- Cookies - Class in tech.riemann.nif.auth.service
-
Cookie工具类
- Cookies() - Constructor for class tech.riemann.nif.auth.service.Cookies
- Cookies.CookieOptions - Class in tech.riemann.nif.auth.service
- cookieSettings() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取Cookie配置
- CookieSettings - Class in tech.riemann.nif.auth.service
-
Cookie配置类
- CookieSettings() - Constructor for class tech.riemann.nif.auth.service.CookieSettings
D
- DefaultAuthService - Class in tech.riemann.nif.auth.service.impl
-
默认认证服务实现
- DefaultAuthService() - Constructor for class tech.riemann.nif.auth.service.impl.DefaultAuthService
E
- ecGenerator(JWSAlgorithm, Curve, String) - Method in class tech.riemann.nif.auth.jwt.Jwks
- eddsaGenerator(JWSAlgorithm, Curve, String) - Method in class tech.riemann.nif.auth.jwt.Jwks
- encode(String) - Method in interface tech.riemann.nif.auth.encode.PasswordMatcher
-
密码加密
- encode(String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
加密(默认 PBKDF2WithHmacSHA256,随机盐 + 10 万次迭代)
- encode(String, String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
Deprecated.4.2.0 起使用
PasswordUtils.encodeByPBKDF2(String)替代 - encode(String, String, String, int) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
加盐迭代多次摘要
- encodeByPBKDF2(String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
- encodeByPBKDF2(String, int) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
PBKDF2 加密(指定迭代次数,供配置化使用)
F
- FEMALE - Enum constant in enum class tech.riemann.nif.auth.service.AuthUser.Sex
-
女性
- filter(ProceedingJoinPoint) - Method in class tech.riemann.nif.auth.aop.TokenAuthInterceptor
-
AOP拦截,拦截带有@Auth注解的类(@within)或方法(@annotation)
G
- gen(String, JWSAlgorithm, int, Curve, String) - Method in class tech.riemann.nif.auth.jwt.Jwks
-
生成密钥,以标准JWKSet格式存储到keyStorePath 存储格式: Base64编码的 {"keys":[{jwk对象}]}
- getAuth(ProceedingJoinPoint) - Method in class tech.riemann.nif.auth.aop.TokenAuthInterceptor
-
获取方法或类上的@Auth注解
- getCookieValue(HttpServletRequest, String) - Method in class tech.riemann.nif.auth.service.Cookies
-
从 HTTP 请求中获取指定名称的 Cookie 值
- getRequest() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取HttpServletRequest对象
- getRequest() - Method in class tech.riemann.nif.auth.service.impl.DefaultAuthService
-
获取HttpServletRequest对象
- getResponse() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取HttpServletResponse对象
- getResponse() - Method in class tech.riemann.nif.auth.service.impl.DefaultAuthService
-
获取HttpServletResponse对象
- getSexInfo() - Method in class tech.riemann.nif.auth.service.AuthUser
- getStatus() - Method in exception class tech.riemann.nif.auth.AuthenticationException
-
获取身份验证失败的状态码
- getStatus() - Method in exception class tech.riemann.nif.auth.AuthorizationException
-
获取权限验证失败的状态码
H
- hmacGenerator(JWSAlgorithm, int, String) - Method in class tech.riemann.nif.auth.jwt.Jwks
- HttpServletAuthService - Class in tech.riemann.nif.auth.service
-
基于HttpServlet的认证服务抽象类
- HttpServletAuthService() - Constructor for class tech.riemann.nif.auth.service.HttpServletAuthService
I
- InMemoryUserDetailService - Class in tech.riemann.nif.auth.service.impl
-
基于内存存储的UserDetailService,请勿在生产环境使用,特别是多节点部署的时候
- InMemoryUserDetailService() - Constructor for class tech.riemann.nif.auth.service.impl.InMemoryUserDetailService
- isAnonymous() - Method in class tech.riemann.nif.auth.service.AuthUser
-
判断当前用户是否为匿名用户
- isPBKDF2Format(String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
判断是否为 PBKDF2 格式
- isValidTimeClaims(JWTClaimsSet, long) - Method in class tech.riemann.nif.auth.jwt.JWTDecoder
-
校验 JWT 声明中的有效期(exp / iat / nbf)
J
- Jwks - Class in tech.riemann.nif.auth.jwt
-
JWK(JSON Web Key)工具类
- Jwks() - Constructor for class tech.riemann.nif.auth.jwt.Jwks
- jwtDecoder() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取JWT解码器
- jwtDecoder() - Method in class tech.riemann.nif.auth.service.impl.DefaultAuthService
-
获取JWT解码器
- JWTDecoder - Class in tech.riemann.nif.auth.jwt
-
JWT解码器
- JWTDecoder(JWK, String) - Constructor for class tech.riemann.nif.auth.jwt.JWTDecoder
-
兼容构造器:仅指定密钥与密钥ID,时钟容差使用默认值(60 秒)
- jwtEncoder() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取JWT编码器
- jwtEncoder() - Method in class tech.riemann.nif.auth.service.impl.DefaultAuthService
-
获取JWT编码器
- JWTEncoder - Class in tech.riemann.nif.auth.jwt
-
JWT编码器
- JWTEncoder() - Constructor for class tech.riemann.nif.auth.jwt.JWTEncoder
K
- key(JWSAlgorithm) - Method in class tech.riemann.nif.auth.jwt.JWTDecoder
-
根据JWS算法获取对应的公钥
L
- load(String, String) - Method in class tech.riemann.nif.auth.jwt.Jwks
-
从文件加载JWKSet,根据kid查找对应的JWK 如果kid为空,返回第一个JWK 支持向后兼容: 自动识别标准JWKSet格式和旧版单个JWK格式
- loadFromString(String, String) - Method in class tech.riemann.nif.auth.jwt.Jwks
-
从字符串加载JWKSet,根据kid查找对应的JWK 如果kid为空,返回第一个JWK 支持向后兼容: 自动识别标准JWKSet格式和旧版单个JWK格式
- logical() - Element in annotation interface tech.riemann.nif.auth.aop.Auth
-
逻辑关系
- login(AuthUser) - Method in interface tech.riemann.nif.auth.service.AuthService
-
用户登录(保持会话)
- login(AuthUser) - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
用户登录
- logout() - Method in interface tech.riemann.nif.auth.service.AuthService
-
用户登出
- logout() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
用户登出
M
- MALE - Enum constant in enum class tech.riemann.nif.auth.service.AuthUser.Sex
-
男性
- match(String, String) - Method in interface tech.riemann.nif.auth.encode.PasswordMatcher
-
密码匹配
- match(String, String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
验证密码(自动识别格式,默认迭代次数)
- match(String, String, int) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
验证密码(自动识别格式,指定 PBKDF2 迭代次数)
- matchesByPBKDF2(String, String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
- matchesByPBKDF2(String, String, int) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
PBKDF2 验证(指定迭代次数,供配置化使用)
N
- needsRehash(String) - Method in interface tech.riemann.nif.auth.encode.PasswordMatcher
-
判断该密文是否需要重新哈希(透明升级)
O
- optionalUser() - Method in interface tech.riemann.nif.auth.service.AuthService
-
尝试获取当前认证用户
- optionalUser() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
尝试获取当前认证用户
- OR - Enum constant in enum class tech.riemann.nif.auth.aop.Auth.Logical
-
或关系 - 用户只需拥有任一指定的角色或权限
P
- pass(String, List) - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
检查URL是否匹配白名单路径模式
- PasswordMatcher - Interface in tech.riemann.nif.auth.encode
-
密码匹配器接口
- PasswordUtils - Class in tech.riemann.nif.auth.encode
-
密码加密工具类
- PasswordUtils() - Constructor for class tech.riemann.nif.auth.encode.PasswordUtils
- PERMISSION - Enum constant in enum class tech.riemann.nif.auth.aop.Auth.AuthType
-
权限鉴权 - 检查用户是否拥有指定的权限
- permissions() - Method in interface tech.riemann.nif.auth.service.AuthService
-
获取当前登录用户的权限列表
R
- randomSaltEncode(String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
MD5随机盐摘要
- randomSaltEncode(String, int) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
MD5随机盐摘要
- randomSaltVerify(String, String) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
MD5随机盐摘要验证
- randomSaltVerify(String, String, int) - Static method in class tech.riemann.nif.auth.encode.PasswordUtils
-
MD5随机盐摘要验证
- refreshToken() - Method in interface tech.riemann.nif.auth.service.AuthService
-
获取当前用户的刷新令牌(Refresh Token)
- refreshToken() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取当前用户的刷新令牌(Refresh Token)
- refreshToken(String) - Method in class tech.riemann.nif.auth.jwt.JWTEncoder
-
生成刷新令牌(Refresh Token)
- refreshToken(String) - Method in interface tech.riemann.nif.auth.service.AuthService
-
为指定用户生成刷新令牌
- refreshToken(String) - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
为指定用户生成刷新令牌
- refreshTokenKey() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取Refresh Token的键名
- ROLE - Enum constant in enum class tech.riemann.nif.auth.aop.Auth.AuthType
-
角色鉴权 - 检查用户是否拥有指定的角色
- roles() - Method in interface tech.riemann.nif.auth.service.AuthService
-
获取当前登录用户的角色列表
- rsaGenerator(JWSAlgorithm, int, String) - Method in class tech.riemann.nif.auth.jwt.Jwks
S
- save(AuthUser) - Method in class tech.riemann.nif.auth.service.impl.InMemoryUserDetailService
- save(AuthUser) - Method in interface tech.riemann.nif.auth.service.UserDetailService
-
保存用户信息
- setAnonymous(boolean) - Method in class tech.riemann.nif.auth.service.AuthUser
-
设置匿名用户状态
- setSexInfo(Codebook) - Method in class tech.riemann.nif.auth.service.AuthUser
- signer() - Method in class tech.riemann.nif.auth.jwt.JWTEncoder
-
创建JWS签名器
- skip() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
是否跳过认证检查
- subject() - Method in interface tech.riemann.nif.auth.service.AuthService
-
根据当前会话信息获取Subject(主题)
- subject() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取当前会话的Subject(主题)
- subject(String) - Method in class tech.riemann.nif.auth.jwt.JWTDecoder
-
获取JWT的主题(Subject)信息
T
- tech.riemann.nif.auth - package tech.riemann.nif.auth
- tech.riemann.nif.auth.aop - package tech.riemann.nif.auth.aop
- tech.riemann.nif.auth.encode - package tech.riemann.nif.auth.encode
- tech.riemann.nif.auth.jwt - package tech.riemann.nif.auth.jwt
- tech.riemann.nif.auth.service - package tech.riemann.nif.auth.service
- tech.riemann.nif.auth.service.impl - package tech.riemann.nif.auth.service.impl
- token() - Method in interface tech.riemann.nif.auth.service.AuthService
-
获取当前用户的访问令牌(Token)
- token() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取当前用户的访问令牌(Token)
- token(Payload) - Method in class tech.riemann.nif.auth.jwt.JWTEncoder
-
使用Payload生成token
- token(String) - Method in class tech.riemann.nif.auth.jwt.JWTEncoder
-
仅使用主题生成token
- token(String) - Method in interface tech.riemann.nif.auth.service.AuthService
-
为指定用户生成访问令牌
- token(String) - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
为指定用户生成访问令牌
- token(String, Map) - Method in class tech.riemann.nif.auth.jwt.JWTEncoder
-
使用主题和附加声明生成token
- token(String, Map, long, TimeUnit) - Method in class tech.riemann.nif.auth.jwt.JWTEncoder
-
使用主题、附加声明和自定义有效期生成token
- TOKEN_EXPIRED - Static variable in class tech.riemann.nif.auth.service.HttpServletAuthService
- TokenAuthInterceptor - Class in tech.riemann.nif.auth.aop
-
Token认证拦截器
- TokenAuthInterceptor(AuthService, List) - Constructor for class tech.riemann.nif.auth.aop.TokenAuthInterceptor
-
构造Token认证拦截器
- tokenKey() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取Token的键名
- tokenOrRefreshToken() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取有效的Token(优先Access Token,否则使用Refresh Token)
- tryRefreshToken(String) - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
尝试使用Refresh Token刷新Access Token
- type() - Element in annotation interface tech.riemann.nif.auth.aop.Auth
-
鉴权类型
U
- user() - Method in interface tech.riemann.nif.auth.service.AuthService
-
获取当前登录用户信息
- user() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取当前登录用户
- userByToken(String) - Method in class tech.riemann.nif.auth.service.impl.InMemoryUserDetailService
-
根据 Token 获取用户信息
- userByToken(String) - Method in interface tech.riemann.nif.auth.service.UserDetailService
-
根据 Token 获取用户信息
- userDetailService() - Method in class tech.riemann.nif.auth.service.HttpServletAuthService
-
获取用户详情服务
- userDetailService() - Method in class tech.riemann.nif.auth.service.impl.DefaultAuthService
-
获取用户详情服务
- UserDetailService - Interface in tech.riemann.nif.auth.service
-
用户详情服务接口,负责用户信息的存储、查询和Token管理
- userName() - Method in interface tech.riemann.nif.auth.service.AuthService
-
获取当前登录用户的用户名
V
- value() - Element in annotation interface tech.riemann.nif.auth.aop.Auth
-
角色或权限值
- valueOf(String) - Static method in enum class tech.riemann.nif.auth.aop.Auth.AuthType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class tech.riemann.nif.auth.aop.Auth.Logical
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class tech.riemann.nif.auth.service.AuthUser.Sex
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class tech.riemann.nif.auth.aop.Auth.AuthType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class tech.riemann.nif.auth.aop.Auth.Logical
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class tech.riemann.nif.auth.service.AuthUser.Sex
-
Returns an array containing the constants of this enum class, in the order they are declared.
- verifiedPayload(String) - Method in class tech.riemann.nif.auth.jwt.JWTDecoder
-
获取验证后的Payload信息
- verifiedSubject(String) - Method in class tech.riemann.nif.auth.jwt.JWTDecoder
-
验证并获取主题
- verify(String) - Method in class tech.riemann.nif.auth.jwt.JWTDecoder
-
验证Token的签名与有效期
- verify(String, long) - Method in class tech.riemann.nif.auth.jwt.JWTDecoder
-
验证Token的签名与有效期
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
PasswordUtils.matchesByPBKDF2(String, String)替代