Class HvlAuthOidcProviderServerConfig
java.lang.Object
tr.com.havelsan.javarch.oauth.auth.starter.oidc.configuration.HvlAuthOidcProviderServerConfig
@Configuration
@EnableWebSecurity
@Import(HvlOAuthOidcConfiguration.class)
public class HvlAuthOidcProviderServerConfig
extends Object
Configuration for OAuth2.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService
Authorization service oauth2 authorization service.org.springframework.security.web.session.HttpSessionEventPublisher
com.nimbusds.jose.jwk.source.JWKSource
<com.nimbusds.jose.proc.SecurityContext> jwkSource
(HvlJwkKeyService hvlJwkKeyService) Jwk source jwk source.org.springframework.security.oauth2.jwt.JwtDecoder
jwtDecoder
(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> jwkSource) Jwt decoder jwt decoder.org.springframework.security.web.SecurityFilterChain
oauth2SecurityFilterChain
(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, HvlOAuth2AuthEntryPointFilter loginUrlEntryPointFilter, tr.com.havelsan.javarch.security.context.repository.HvlSecurityContextRepository securityContextRepository, HvlJpaRegisteredClientRepository registeredClientRepository, org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService, HvlAuthorizationDefaultConsentService authorizationConsentService, HvlOidcUserInfoMapper oidcUserInfoMapper) Oauth 2 security filter chain security filter chain.org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings
oidcProviderSettings
(HvlAuthProviderServerProperties hvlAuthProviderServerProperties) Oidc provider settings authorization server settings.
-
Constructor Details
-
HvlAuthOidcProviderServerConfig
public HvlAuthOidcProviderServerConfig()
-
-
Method Details
-
oauth2SecurityFilterChain
@Bean @Order(-2147483648) public org.springframework.security.web.SecurityFilterChain oauth2SecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, HvlOAuth2AuthEntryPointFilter loginUrlEntryPointFilter, tr.com.havelsan.javarch.security.context.repository.HvlSecurityContextRepository securityContextRepository, HvlJpaRegisteredClientRepository registeredClientRepository, org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService, HvlAuthorizationDefaultConsentService authorizationConsentService, HvlOidcUserInfoMapper oidcUserInfoMapper) throws Exception Oauth 2 security filter chain security filter chain.- Parameters:
httpSecurity
- the http securityloginUrlEntryPointFilter
- the login url entry point filtersecurityContextRepository
- the security context repositoryregisteredClientRepository
- the hvl registered client serviceauthorizationService
- the authorization serviceauthorizationConsentService
- the hvl authorization consent serviceoidcUserInfoMapper
- the hvl oidc user info mapper- Returns:
- the security filter chain
- Throws:
Exception
- the exception
-
httpSessionEventPublisher
@Bean public org.springframework.security.web.session.HttpSessionEventPublisher httpSessionEventPublisher() -
jwtDecoder
@Bean public org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> jwkSource) Jwt decoder jwt decoder.- Parameters:
jwkSource
- the jwk source- Returns:
- the jwt decoder
-
jwkSource
@Bean public com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> jwkSource(HvlJwkKeyService hvlJwkKeyService) Jwk source jwk source.- Parameters:
hvlJwkKeyService
- the hvl jwk key service- Returns:
- the jwk source
-
oidcProviderSettings
@Bean public org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings oidcProviderSettings(HvlAuthProviderServerProperties hvlAuthProviderServerProperties) Oidc provider settings authorization server settings.- Parameters:
hvlAuthProviderServerProperties
- the hvl auth provider server props- Returns:
- the authorization server settings
-
authorizationService
@ConditionalOnMissingBean @Bean public org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService()Authorization service oauth2 authorization service.- Returns:
- the o auth 2 authorization service
-