Select Git revision
gitlab-ci-docker.yml
-
semantic-release-bot authored
## [6.1.7](https://gitlab.com/to-be-continuous/docker/compare/6.1.6...6.1.7) (2025-04-25) ### Bug Fixes * install custom CA certs before awk ([45b8cb39](https://gitlab.com/to-be-continuous/docker/commit/45b8cb399cd5f73455d5e2be81f51e1672b46823))
semantic-release-bot authored## [6.1.7](https://gitlab.com/to-be-continuous/docker/compare/6.1.6...6.1.7) (2025-04-25) ### Bug Fixes * install custom CA certs before awk ([45b8cb39](https://gitlab.com/to-be-continuous/docker/commit/45b8cb399cd5f73455d5e2be81f51e1672b46823))
JWTSecurityConfig.java 1.26 KiB
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.tecnalia.datausage.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
/**
*
* @author root
*/
@Configuration
public class JWTSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${spring.profiles.active:Unknown}")
private String activeProfile;
@Override
public void configure(HttpSecurity http) throws Exception {
http.cors().and().csrf().disable().formLogin().disable().headers().httpStrictTransportSecurity().disable().and()
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.ALWAYS).and()
.authorizeRequests(authz -> authz.antMatchers("/swagger-ui.html", "/swagger-ui/**","/v3/api-docs/**","/platoontec/**")
.permitAll().anyRequest().authenticated())
.oauth2ResourceServer(oauth2 -> oauth2.jwt());
}}