public class HerodotusJwtGrantedAuthoritiesConverter extends Object implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,Collection<org.springframework.security.core.GrantedAuthority>>
Description: Jwt 权限数据转换器
| 构造器和说明 |
|---|
HerodotusJwtGrantedAuthoritiesConverter() |
| 限定符和类型 | 方法和说明 |
|---|---|
Collection<org.springframework.security.core.GrantedAuthority> |
convert(org.springframework.security.oauth2.jwt.Jwt jwt)
Extract
GrantedAuthoritys from the given Jwt. |
void |
setAuthoritiesClaimName(String authoritiesClaimName)
Sets the name of token claim to use for mapping
authorities by this converter. |
void |
setAuthorityPrefix(String authorityPrefix)
Sets the prefix to use for
authorities mapped by this
converter. |
public Collection<org.springframework.security.core.GrantedAuthority> convert(org.springframework.security.oauth2.jwt.Jwt jwt)
GrantedAuthoritys from the given Jwt.convert 在接口中 org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,Collection<org.springframework.security.core.GrantedAuthority>>jwt - The Jwt tokenauthorities read from the token scopespublic void setAuthorityPrefix(String authorityPrefix)
authorities mapped by this
converter. Defaults toauthorityPrefix - The authority prefixpublic void setAuthoritiesClaimName(String authoritiesClaimName)
authorities by this converter. Defaults toauthoritiesClaimName - The token claim name to map authoritiesCopyright © 2023 Dromara. All rights reserved.