Class ResourceServerSecurity.Builder

java.lang.Object
io.leandev.appfuse.security.resourceserver.ResourceServerSecurity.Builder
Enclosing class:
ResourceServerSecurity

public static final class ResourceServerSecurity.Builder extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    apiKey(boolean enabled, ApiKeyPrincipalLookup lookup, String headerName)
    選擇性啟用 API-key 呈遞;啟用但未提供 lookup 時立即失敗。
    basicAuth(boolean enabled, org.springframework.security.authentication.AuthenticationManager authenticationManager, org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
    選擇性啟用 Basic Auth;使用 reference implementation 提供的互動式 manager 與錯誤方言。
    org.springframework.security.config.annotation.web.builders.HttpSecurity
    套用固定機制並回傳同一個 builder;authorization 與具體位址仍由呼叫端決定。

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • apiKey

      public ResourceServerSecurity.Builder apiKey(boolean enabled, ApiKeyPrincipalLookup lookup, String headerName)
      選擇性啟用 API-key 呈遞;啟用但未提供 lookup 時立即失敗。
    • basicAuth

      public ResourceServerSecurity.Builder basicAuth(boolean enabled, org.springframework.security.authentication.AuthenticationManager authenticationManager, org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
      選擇性啟用 Basic Auth;使用 reference implementation 提供的互動式 manager 與錯誤方言。
    • configure

      public org.springframework.security.config.annotation.web.builders.HttpSecurity configure() throws Exception
      套用固定機制並回傳同一個 builder;authorization 與具體位址仍由呼叫端決定。
      Throws:
      Exception