Class JdbcAuthorizationServerConfiguration

java.lang.Object
com.irurueta.authserver.authorization.infrastructure.persistence.clients.JdbcAuthorizationServerConfiguration

@Configuration(proxyBeanMethods=false) public class JdbcAuthorizationServerConfiguration extends Object
Registers the JDBC implementations of the Spring Authorization Server persistence services.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationConsentService
    authorizationConsentService(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository)
    Creates the service that stores the consents granted by users.
    org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService
    authorizationService(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository, AuthorizationJsonMapperFactory jsonMapperFactory)
    Creates the service that stores OAuth 2 authorizations, decorated to detect the reuse of rotated refresh tokens.
    org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository
    registeredClientRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
    Creates the repository of registered clients.

    Methods inherited from class java.lang.Object

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

    • JdbcAuthorizationServerConfiguration

      public JdbcAuthorizationServerConfiguration()
  • Method Details

    • registeredClientRepository

      @Bean public org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
      Creates the repository of registered clients.
      Parameters:
      jdbcTemplate - JDBC template of the application datasource.
      Returns:
      the registered client repository.
    • authorizationService

      @Bean public org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository, AuthorizationJsonMapperFactory jsonMapperFactory)
      Creates the service that stores OAuth 2 authorizations, decorated to detect the reuse of rotated refresh tokens.
      Parameters:
      jdbcTemplate - JDBC template of the application datasource.
      registeredClientRepository - repository used to resolve the client of each authorization.
      jsonMapperFactory - creates the mapper that serializes the stored attributes and claims.
      Returns:
      the authorization service.
    • authorizationConsentService

      @Bean public org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationConsentService authorizationConsentService(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository)
      Creates the service that stores the consents granted by users.
      Parameters:
      jdbcTemplate - JDBC template of the application datasource.
      registeredClientRepository - repository used to resolve the client of each consent.
      Returns:
      the authorization consent service.