クラス ServerHttpSecurity.OneTimeTokenLoginSpec
java.lang.ObjectSE
org.springframework.security.config.web.server.ServerHttpSecurity.OneTimeTokenLoginSpec
- 含まれているクラス:
- ServerHttpSecurity
ワンタイムトークンログインサポートを構成する
- 導入:
- 6.4
- 関連事項:
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明authenticationConverter(ServerAuthenticationConverter authenticationConverter) 受信リクエストをAuthenticationに変換するときに、このServerAuthenticationConverterを使用します。authenticationFailureHandler(ServerAuthenticationFailureHandler authenticationFailureHandler) 認証が失敗したときに使用するServerAuthenticationFailureHandlerを指定します。authenticationManager(ReactiveAuthenticationManager authenticationManager) ワンタイムトークンの場合はReactiveAuthenticationManagerを指定します。authenticationSuccessHandler(ConsumerSE<ListSE<ServerAuthenticationSuccessHandler>> handlersConsumer) ServerAuthenticationSuccessHandlerのリストをカスタマイズできます。authenticationSuccessHandler(ServerAuthenticationSuccessHandler authenticationSuccessHandler) protected voidconfigure(ServerHttpSecurity http) defaultSubmitPageUrl(StringSE submitPageUrl) デフォルトの送信ページが生成される URL を設定します。loginProcessingUrl(StringSE loginProcessingUrl) ログインリクエストを処理する URL を指定します。デフォルトは/login/ottです。securityContextRepository(ServerSecurityContextRepository securityContextRepository) Authenticationを保存するために使用されるServerSecurityContextRepository。showDefaultSubmitPage(boolean show) デフォルトのワンタイムトークン送信ページを表示するかどうかを構成します。tokenGeneratingUrl(StringSE tokenGeneratingUrl) ワンタイムトークン生成リクエストが処理される URL を指定します。tokenGenerationSuccessHandler(ServerOneTimeTokenGenerationSuccessHandler oneTimeTokenGenerationSuccessHandler) 生成されたワンタイムトークンを処理するために使用する戦略を指定します。tokenService(ReactiveOneTimeTokenService oneTimeTokenService) OneTimeTokenの生成と消費に使用されるReactiveOneTimeTokenServiceを構成する
コンストラクターの詳細
OneTimeTokenLoginSpec
public OneTimeTokenLoginSpec()
メソッドの詳細
configure
authenticationSuccessHandler
public ServerHttpSecurity.OneTimeTokenLoginSpec authenticationSuccessHandler(ConsumerSE<ListSE<ServerAuthenticationSuccessHandler>> handlersConsumer) ServerAuthenticationSuccessHandlerのリストをカスタマイズできます。デフォルトのリストには、"/" にリダイレクトするRedirectServerAuthenticationSuccessHandlerが含まれています。- パラメーター:
handlersConsumer- ハンドラーコンシューマー- 戻り値:
ServerHttpSecurity.OneTimeTokenLoginSpecの構成を続行するには
authenticationSuccessHandler
public ServerHttpSecurity.OneTimeTokenLoginSpec authenticationSuccessHandler(ServerAuthenticationSuccessHandler authenticationSuccessHandler) - パラメーター:
authenticationSuccessHandler-ServerAuthenticationSuccessHandler
authenticationFailureHandler
public ServerHttpSecurity.OneTimeTokenLoginSpec authenticationFailureHandler(ServerAuthenticationFailureHandler authenticationFailureHandler) 認証が失敗したときに使用するServerAuthenticationFailureHandlerを指定します。デフォルトでは、RedirectServerAuthenticationFailureHandlerを使用して "/login?error" にリダイレクトされます- パラメーター:
authenticationFailureHandler- 認証が失敗したときに使用するServerAuthenticationFailureHandler
authenticationManager
public ServerHttpSecurity.OneTimeTokenLoginSpec authenticationManager(ReactiveAuthenticationManager authenticationManager) ワンタイムトークンにReactiveAuthenticationManagerを指定します。デフォルトの実装はOneTimeTokenReactiveAuthenticationManagerです- パラメーター:
authenticationManager-
tokenService
public ServerHttpSecurity.OneTimeTokenLoginSpec tokenService(ReactiveOneTimeTokenService oneTimeTokenService) OneTimeTokenの生成と消費に使用されるReactiveOneTimeTokenServiceを構成する- パラメーター:
oneTimeTokenService-
authenticationConverter
public ServerHttpSecurity.OneTimeTokenLoginSpec authenticationConverter(ServerAuthenticationConverter authenticationConverter) 受信リクエストをAuthenticationに変換する場合は、このServerAuthenticationConverterを使用します。デフォルトでは、ServerOneTimeTokenAuthenticationConverterが使用されます。- パラメーター:
authenticationConverter- 使用するServerAuthenticationConverter
loginProcessingUrl
ログインリクエストを処理する URL を指定します。デフォルトは/login/ottです。POST リクエストのみが処理されるため、CSRF 保護が有効になっている場合は、有効な CSRF トークンを渡すようにしてください。- パラメーター:
loginProcessingUrl-
showDefaultSubmitPage
デフォルトのワンタイムトークン送信ページを表示するかどうかを構成します。これにより、OneTimeTokenSubmitPageGeneratingWebFilterが構成されなくなります。- パラメーター:
show-
defaultSubmitPageUrl
デフォルトの送信ページが生成される URL を設定します。デフォルトは/login/ottです。デフォルトの送信ページを生成したくない場合は、showDefaultSubmitPage(boolean)を使用する必要があります。このメソッドは常にtrueを渡してshowDefaultSubmitPage(boolean)を呼び出すことに注意してください。- パラメーター:
submitPageUrl-
tokenGenerationSuccessHandler
public ServerHttpSecurity.OneTimeTokenLoginSpec tokenGenerationSuccessHandler(ServerOneTimeTokenGenerationSuccessHandler oneTimeTokenGenerationSuccessHandler) 生成されたワンタイムトークンを処理するために使用する戦略を指定します。- パラメーター:
oneTimeTokenGenerationSuccessHandler-
tokenGeneratingUrl
ワンタイムトークン生成リクエストが処理される URL を指定します。デフォルトは/ott/generateです。- パラメーター:
tokenGeneratingUrl-
securityContextRepository
public ServerHttpSecurity.OneTimeTokenLoginSpec securityContextRepository(ServerSecurityContextRepository securityContextRepository) Authenticationを保存するために使用されるServerSecurityContextRepository。デフォルトはWebSessionServerSecurityContextRepositoryです。後続のリクエストでSecurityContextをロードするには、値をロードできるようにReactorContextWebFilterを構成する必要があります(暗黙的にリンクされていません)。- パラメーター:
securityContextRepository- 使用するリポジトリ- 戻り値:
ServerHttpSecurity.OneTimeTokenLoginSpecの構成を続行するには