Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Resource Gateway dependencies -->
<onegini-communication-resiliency-starter.version>3.0.0</onegini-communication-resiliency-starter.version>
<spring-boot.version>2.7.7</spring-boot.version>
<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
<jib-maven-plugin.version>3.3.1</jib-maven-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-enforcer-plugin.version>3.2.1</maven-enforcer-plugin.version>
<onegini-communication-resiliency-starter.version>3.2.2</onegini-communication-resiliency-starter.version>
<snakeyaml.version>2.0</snakeyaml.version>
<spring-boot.version>2.7.9</spring-boot.version>
</properties>

<licenses>
Expand All @@ -46,6 +51,13 @@

<dependencyManagement>
<dependencies>
<!-- Overridden to fix CVE-2022-1471, remove this override once spring boot supports this version.
Latest spring boot version when writing: 2.7.9 -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -108,7 +120,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<id>enforce-no-snapshots</id>
Expand All @@ -130,7 +142,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand All @@ -140,12 +152,12 @@
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.10</version>
<version>${git-commit-id-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.3.1</version>
<version>${jib-maven-plugin.version}</version>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import static org.springframework.http.HttpHeaders.AUTHORIZATION;
import static org.springframework.http.HttpHeaders.CONTENT_TYPE;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;

import com.onegini.examples.resourcegateway.model.ApplicationDetails;
import com.onegini.examples.resourcegateway.model.DecoratedUser;
Expand Down Expand Up @@ -115,6 +117,12 @@ public void postResource(@RequestHeader(name = AUTHORIZATION, required = false)
response.flushBuffer();
}

//For certificate pinning sdk testing
@RequestMapping(path ="/unauthenticated", method = { GET, POST })
public ResponseEntity<String> unauthenticated() {
return new ResponseEntity<>("OK", OK);
}

private void validateScopeAndTokenType(final TokenIntrospectionResult tokenIntrospectionResult, final String requiredScope) {
scopeValidationService.validateScopeGranted(tokenIntrospectionResult.getScope(), requiredScope);
tokenTypeValidationService.validateNoImplicitAuthenticationToken(tokenIntrospectionResult.getAmr());
Expand Down