From 1ebe5b00c46a70f2cef43cf7b56bc5ecf3a821e4 Mon Sep 17 00:00:00 2001 From: Kuamr Shubham Date: Fri, 17 Apr 2020 17:36:18 +0530 Subject: [PATCH] add. --- .../api/Manifest/ManifestDataInvalid.java | 8 ++++++++ .../api/OktaOAuth2WebSecurityConfigurerAdapter.java | 2 +- src/main/resources/application-dev.properties | 2 +- src/main/resources/application.properties | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/DeploymentPortal/api/Manifest/ManifestDataInvalid.java diff --git a/src/main/java/com/DeploymentPortal/api/Manifest/ManifestDataInvalid.java b/src/main/java/com/DeploymentPortal/api/Manifest/ManifestDataInvalid.java new file mode 100644 index 00000000..b42de548 --- /dev/null +++ b/src/main/java/com/DeploymentPortal/api/Manifest/ManifestDataInvalid.java @@ -0,0 +1,8 @@ +package com.DeploymentPortal.api.Manifest; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(HttpStatus.BAD_REQUEST) +public class ManifestDataInvalid extends Throwable { +} diff --git a/src/main/java/com/DeploymentPortal/api/OktaOAuth2WebSecurityConfigurerAdapter.java b/src/main/java/com/DeploymentPortal/api/OktaOAuth2WebSecurityConfigurerAdapter.java index 6fc250f9..3ce9b5e7 100644 --- a/src/main/java/com/DeploymentPortal/api/OktaOAuth2WebSecurityConfigurerAdapter.java +++ b/src/main/java/com/DeploymentPortal/api/OktaOAuth2WebSecurityConfigurerAdapter.java @@ -14,7 +14,7 @@ class OktaOAuth2WebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapte @Bean public JwtDecoder customDecoder(OAuth2ResourceServerProperties properties) { NimbusJwtDecoder jwtDecoder = NimbusJwtDecoder - .withJwkSetUri("https://btech-christuniversity.okta.com/oauth2/v1/keys") + .withJwkSetUri("https://navi-2020.okta.com/oauth2/v1/keys") .build(); return jwtDecoder; diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index de00b36c..63d6e894 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -7,7 +7,7 @@ spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL9Dialect spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true - +server.port=9090 #security.oauth2.resource.jwk.key-set-uri=https://btech-christuniversity.okta.com/oauth2/v1/keys spring.main.allow.bean-definition-overriding=true #okta.oauth2.localTokenValidation=false \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9ef8fa07..d9e734c8 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -7,7 +7,7 @@ spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL9Dialect spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true - +server.port=9090 #spring.main.allow.bean-definition-overriding=true #security.oauth2.resource.jwk.key-set-uri=https://btech-christuniversity.okta.com/oauth2/v1/keys #okta.oauth2.audience=http://localhost:8080