类 HerodotusJwtGrantedAuthoritiesConverter

java.lang.Object
cn.herodotus.stirrup.oauth2.authorization.converter.HerodotusJwtGrantedAuthoritiesConverter
所有已实现的接口:
org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,Collection<org.springframework.security.core.GrantedAuthority>>

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 权限数据转换器

作者:
: gengwei.zheng
Date:
: 2022/3/13 14:21
  • 构造器详细资料

    • HerodotusJwtGrantedAuthoritiesConverter

      public HerodotusJwtGrantedAuthoritiesConverter()
  • 方法详细资料

    • convert

      public Collection<org.springframework.security.core.GrantedAuthority> convert(org.springframework.security.oauth2.jwt.Jwt jwt)
      Extract 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 token
      返回:
      The authorities read from the token scopes
    • setAuthorityPrefix

      public void setAuthorityPrefix(String authorityPrefix)
      Sets the prefix to use for authorities mapped by this converter. Defaults to
      参数:
      authorityPrefix - The authority prefix
      从以下版本开始:
      5.2
    • setAuthoritiesClaimName

      public void setAuthoritiesClaimName(String authoritiesClaimName)
      Sets the name of token claim to use for mapping authorities by this converter. Defaults to
      参数:
      authoritiesClaimName - The token claim name to map authorities
      从以下版本开始:
      5.2