Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
MelleD committed Feb 14, 2024
1 parent cb3c331 commit e7d32a2
Show file tree
Hide file tree
Showing 19 changed files with 85 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ClientPropertiesConfiguration {
properties.put("spring.security.oauth2.client.registration.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.authorization-grant-type", "implicit" );
properties.put("spring.security.oauth2.client.provider.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.authorization-uri", "{{{authorizationUrl}}}" );
{{/isImplicit}}
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource( {{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}, properties );
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource("{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}", properties );
configurableEnvironment.getPropertySources().addLast( propertiesPropertySource )
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ src/main/java/org/openapitools/model/Order.java
src/main/java/org/openapitools/model/Pet.java
src/main/java/org/openapitools/model/Tag.java
src/main/java/org/openapitools/model/User.java
src/main/resources/oauth2-client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.context.annotation.Configuration;


@Configuration
public class ClientConfiguration {

private static final String CLIENT_PRINCIPAL_IMPLICIT = "oauth2FeignClient";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
package org.openapitools.configuration;

import org.springframework.context.annotation.PropertySource;
import java.util.Properties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.PropertiesPropertySource;

@PropertySource( "classpath:/oauth2-client.properties" )
@Configuration
@Configuration(value = "org.openapitools.configuration.clientPropertiesConfiguration")
public class ClientPropertiesConfiguration {

public ClientPropertiesConfiguration( final ConfigurableEnvironment configurableEnvironment ) {
final Properties properties = new Properties();
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id", "set-petstoreAuthImplicit-client-id" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.scope", "write:pets,read:pets" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type", "implicit" );
properties.put("spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri", "http://petstore.swagger.io/api/oauth/dialog" );
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource("petstoreAuthImplicit", properties );
configurableEnvironment.getPropertySources().addLast( propertiesPropertySource )
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ src/main/java/org/openapitools/model/Order.java
src/main/java/org/openapitools/model/Pet.java
src/main/java/org/openapitools/model/Tag.java
src/main/java/org/openapitools/model/User.java
src/main/resources/oauth2-client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.context.annotation.Configuration;


@Configuration
public class ClientConfiguration {

private static final String CLIENT_PRINCIPAL_IMPLICIT = "oauth2FeignClient";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
package org.openapitools.configuration;

import org.springframework.context.annotation.PropertySource;
import java.util.Properties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.PropertiesPropertySource;

@PropertySource( "classpath:/oauth2-client.properties" )
@Configuration
@Configuration(value = "org.openapitools.configuration.clientPropertiesConfiguration")
public class ClientPropertiesConfiguration {

public ClientPropertiesConfiguration( final ConfigurableEnvironment configurableEnvironment ) {
final Properties properties = new Properties();
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id", "set-petstoreAuthImplicit-client-id" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.scope", "write:pets,read:pets" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type", "implicit" );
properties.put("spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri", "http://petstore.swagger.io/api/oauth/dialog" );
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource("petstoreAuthImplicit", properties );
configurableEnvironment.getPropertySources().addLast( propertiesPropertySource )
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ src/main/java/org/openapitools/model/Order.java
src/main/java/org/openapitools/model/Pet.java
src/main/java/org/openapitools/model/Tag.java
src/main/java/org/openapitools/model/User.java
src/main/resources/oauth2-client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.context.annotation.Configuration;


@Configuration
public class ClientConfiguration {

private static final String CLIENT_PRINCIPAL_IMPLICIT = "oauth2FeignClient";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
package org.openapitools.configuration;

import org.springframework.context.annotation.PropertySource;
import java.util.Properties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.PropertiesPropertySource;

@PropertySource( "classpath:/oauth2-client.properties" )
@Configuration
@Configuration(value = "org.openapitools.configuration.clientPropertiesConfiguration")
public class ClientPropertiesConfiguration {

public ClientPropertiesConfiguration( final ConfigurableEnvironment configurableEnvironment ) {
final Properties properties = new Properties();
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id", "set-petstoreAuthImplicit-client-id" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.scope", "write:pets,read:pets" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type", "implicit" );
properties.put("spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri", "http://petstore.swagger.io/api/oauth/dialog" );
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource("petstoreAuthImplicit", properties );
configurableEnvironment.getPropertySources().addLast( propertiesPropertySource )
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ src/main/java/org/openapitools/model/Order.java
src/main/java/org/openapitools/model/Pet.java
src/main/java/org/openapitools/model/Tag.java
src/main/java/org/openapitools/model/User.java
src/main/resources/oauth2-client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.context.annotation.Configuration;


@Configuration
public class ClientConfiguration {

private static final String CLIENT_PRINCIPAL_IMPLICIT = "oauth2FeignClient";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
package org.openapitools.configuration;

import org.springframework.context.annotation.PropertySource;
import java.util.Properties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.PropertiesPropertySource;

@PropertySource( "classpath:/oauth2-client.properties" )
@Configuration
@Configuration(value = "org.openapitools.configuration.clientPropertiesConfiguration")
public class ClientPropertiesConfiguration {

public ClientPropertiesConfiguration( final ConfigurableEnvironment configurableEnvironment ) {
final Properties properties = new Properties();
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id", "set-petstoreAuthImplicit-client-id" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.scope", "write:pets,read:pets" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type", "implicit" );
properties.put("spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri", "http://petstore.swagger.io/api/oauth/dialog" );
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource("petstoreAuthImplicit", properties );
configurableEnvironment.getPropertySources().addLast( propertiesPropertySource )
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ src/main/java/org/openapitools/model/Order.java
src/main/java/org/openapitools/model/Pet.java
src/main/java/org/openapitools/model/Tag.java
src/main/java/org/openapitools/model/User.java
src/main/resources/oauth2-client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.context.annotation.Configuration;


@Configuration
public class ClientConfiguration {

private static final String CLIENT_PRINCIPAL_IMPLICIT = "oauth2FeignClient";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
package org.openapitools.configuration;

import org.springframework.context.annotation.PropertySource;
import java.util.Properties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.PropertiesPropertySource;

@PropertySource( "classpath:/oauth2-client.properties" )
@Configuration
@Configuration(value = "org.openapitools.configuration.clientPropertiesConfiguration")
public class ClientPropertiesConfiguration {

public ClientPropertiesConfiguration( final ConfigurableEnvironment configurableEnvironment ) {
final Properties properties = new Properties();
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id", "set-petstoreAuthImplicit-client-id" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.scope", "write:pets,read:pets" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type", "implicit" );
properties.put("spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri", "http://petstore.swagger.io/api/oauth/dialog" );
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource("petstoreAuthImplicit", properties );
configurableEnvironment.getPropertySources().addLast( propertiesPropertySource )
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ src/main/java/org/openapitools/model/Order.java
src/main/java/org/openapitools/model/Pet.java
src/main/java/org/openapitools/model/Tag.java
src/main/java/org/openapitools/model/User.java
src/main/resources/oauth2-client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.context.annotation.Configuration;


@Configuration
public class ClientConfiguration {

private static final String CLIENT_PRINCIPAL_IMPLICIT = "oauth2FeignClient";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
package org.openapitools.configuration;

import org.springframework.context.annotation.PropertySource;
import java.util.Properties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.PropertiesPropertySource;

@PropertySource( "classpath:/oauth2-client.properties" )
@Configuration
@Configuration(value = "org.openapitools.configuration.clientPropertiesConfiguration")
public class ClientPropertiesConfiguration {

public ClientPropertiesConfiguration( final ConfigurableEnvironment configurableEnvironment ) {
final Properties properties = new Properties();
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id", "set-petstoreAuthImplicit-client-id" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.scope", "write:pets,read:pets" );
properties.put("spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type", "implicit" );
properties.put("spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri", "http://petstore.swagger.io/api/oauth/dialog" );
final PropertiesPropertySource propertiesPropertySource = new PropertiesPropertySource("petstoreAuthImplicit", properties );
configurableEnvironment.getPropertySources().addLast( propertiesPropertySource )
}

}

0 comments on commit e7d32a2

Please sign in to comment.