Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarmokadam committed Feb 13, 2018
2 parents 7a8c621 + a477f71 commit 28b6c1c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-ws</artifactId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Configuration;

import ${package}.SpringBootApp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package ${package}.general.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
Expand All @@ -28,11 +29,13 @@ public JsonWebTokenUtility getJsonWebTokenUtility() {
@Override
protected void setupAuthorization(HttpSecurity http) throws Exception {

//Unsecure resources (triggers for actuator and more)
//Unsecure resources (triggers for actuator and more)
String[] unsecuredResources = new String[] { "/health", "/info", "/metrics", "/trace", "/refresh" };

http.authorizeRequests()
// authenticate all other requests
//allow Options request
.antMatchers(HttpMethod.OPTIONS).permitAll()
//allow unsecure resources
.antMatchers(unsecuredResources).permitAll()
// authenticate all other requests
.anyRequest().authenticated();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.apache.catalina.filters.SetCharacterEncodingFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

import io.oasp.module.logging.common.api.DiagnosticContextFacade;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import java.security.Key;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.Date;
import java.util.List;

import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -98,7 +98,7 @@ public final UserDetailsJsonWebTokenAbstract retrieveUserDetails(String token) {
@Value("${jwt.encodedKey}")
public final void setEncodedKey(String encodedKey) {

byte[] decodedKey = Base64.getDecoder().decode(encodedKey);
byte[] decodedKey = DatatypeConverter.parseBase64Binary(encodedKey);
this.secretKey = new SecretKeySpec(decodedKey, SIGNATURE_ALGORITHM.getJcaName());

}
Expand Down
2 changes: 1 addition & 1 deletion modules/microservices/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<description>Devonfw microservices archetypes and module</description>

<properties>
<spring.cloud.boot.version>Brixton.SR7</spring.cloud.boot.version>
<spring.cloud.boot.version>Dalston.SR4</spring.cloud.boot.version>
</properties>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<properties>
<oasp4j.version>2.5.0</oasp4j.version>
<devonfw.version>2.3.0</devonfw.version>
<devonfw.version>2.3.1</devonfw.version>
<spring.boot.version>1.5.3.RELEASE</spring.boot.version>
<java.version>1.7</java.version>
<oasp.port.range>81</oasp.port.range>
Expand Down

0 comments on commit 28b6c1c

Please sign in to comment.