クラス MappedJwtClaimSetConverter
java.lang.ObjectSE
org.springframework.security.oauth2.jwt.MappedJwtClaimSetConverter
- 実装されているすべてのインターフェース:
org.springframework.core.convert.converter.Converter<MapSE<StringSE,ObjectSE>, MapSE<StringSE, ObjectSE>>
public final class MappedJwtClaimSetConverter
extends ObjectSE
implements org.springframework.core.convert.converter.Converter<MapSE<StringSE,ObjectSE>,MapSE<StringSE,ObjectSE>>
JWT クレームセットをクレームごとに変換します。クレーム名によってカスタムコンバーターで構成できます。
- 導入:
- 5.1
- 関連事項:
コンストラクターの概要
コンストラクターコンストラクター説明MappedJwtClaimSetConverter(MapSE<StringSE, org.springframework.core.convert.converter.Converter<ObjectSE, ?>> claimTypeConverters) 指定された引数を使用してMappedJwtClaimSetConverterを構築します。これにより、デフォルトコンバーターのセットが完全に置き換えられます。メソッドのサマリー
修飾子と型メソッド説明static MappedJwtClaimSetConverterwithDefaults(MapSE<StringSE, org.springframework.core.convert.converter.Converter<ObjectSE, ?>> claimTypeConverters) クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.core.convert.converter.Converter から継承されたメソッド
andThen
コンストラクターの詳細
MappedJwtClaimSetConverter
public MappedJwtClaimSetConverter(MapSE<StringSE, org.springframework.core.convert.converter.Converter<ObjectSE, ?>> claimTypeConverters) 提供された引数を使用してMappedJwtClaimSetConverterを構築します。これにより、デフォルトのコンバーターのセットが完全に置き換えられます。nullを返すコンバーターは、クレームセットからクレームを削除します。null以外の値を返すコンバーターは、クレームセット内のそのクレームを追加または置換します。- パラメーター:
claimTypeConverters- 使用するコンバーターのMapSE
メソッドの詳細
withDefaults
public static MappedJwtClaimSetConverter withDefaults(MapSE<StringSE, org.springframework.core.convert.converter.Converter<ObjectSE, ?>> claimTypeConverters) MappedJwtClaimSetConverterを構築し、個々のクレームコンバーターをConverterの提供されたMapSE でオーバーライドします。例: 次の例では、既定のクレームコンバーターのみで構成されたインスタンスが生成されます。MappedJwtClaimSetConverter.withDefaults(Collections.emptyMap());または、次の例では、サブジェクトのカスタムコンバーターを提供し、他のデフォルトはそのままにします。MappedJwtClaimsSetConverter.withDefaults( Collections.singletonMap(JwtClaimNames.SUB, new UserDetailsServiceJwtSubjectConverter()));基礎となるコンバーターのMapSE を完全に置き換えるには、MappedJwtClaimSetConverter(Map)を参照してください。nullを返すコンバーターは、クレームセットからクレームを削除します。null以外の値を返すコンバーターは、クレームセット内のそのクレームを追加または置換します。- パラメーター:
claimTypeConverters-- 戻り値:
- 提供されたコンバーターと、オーバーライドされなかったデフォルトを含む
MappedJwtClaimSetConverterのインスタンス。
convert