init
This commit is contained in:
@@ -852,7 +852,7 @@
|
|||||||
<profile>
|
<profile>
|
||||||
<id>docker-compose</id>
|
<id>docker-compose</id>
|
||||||
<activation>
|
<activation>
|
||||||
<activeByDefault>true</activeByDefault>
|
<activeByDefault>false</activeByDefault>
|
||||||
</activation>
|
</activation>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -5,9 +5,12 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager;
|
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager;
|
||||||
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder;
|
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientProviderBuilder;
|
||||||
|
import org.springframework.security.oauth2.client.registration.ClientRegistration;
|
||||||
import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
|
import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
|
||||||
|
import org.springframework.security.oauth2.client.registration.InMemoryClientRegistrationRepository;
|
||||||
import org.springframework.security.oauth2.client.web.DefaultOAuth2AuthorizedClientManager;
|
import org.springframework.security.oauth2.client.web.DefaultOAuth2AuthorizedClientManager;
|
||||||
import org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository;
|
import org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository;
|
||||||
|
import org.springframework.security.oauth2.core.AuthorizationGrantType;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class OAuth2Configuration {
|
public class OAuth2Configuration {
|
||||||
@@ -32,4 +35,27 @@ public class OAuth2Configuration {
|
|||||||
|
|
||||||
return authorizedClientManager;
|
return authorizedClientManager;
|
||||||
}
|
}
|
||||||
|
// @Bean
|
||||||
|
// public ClientRegistrationRepository clientRegistrationRepository() {
|
||||||
|
// return new InMemoryClientRegistrationRepository(auth0ClientRegistration());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private ClientRegistration auth0ClientRegistration() {
|
||||||
|
// String baseURL = "dev-tooc5a5nck2ypxpw.us.auth0.com";
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// return ClientRegistration.withRegistrationId("auth0")
|
||||||
|
// .clientId("42r6XuNTM1jRB9M2LLTjoyap4HBmXByO")
|
||||||
|
// .clientSecret("F-AAsTTSOKx8bkPRrM4vCaMdv-hyLI6yjWcJE7Kh-Y2QKLcqssn0mmKk-6TQGezy")
|
||||||
|
// .redirectUri("http://localhost:8080/login/oauth2/code/auth0")
|
||||||
|
// .authorizationUri("https://dev-tooc5a5nck2ypxpw.us.auth0.com/authorize")
|
||||||
|
// .tokenUri("https://dev-tooc5a5nck2ypxpw.us.auth0.com/oauth/token")
|
||||||
|
// .userInfoUri("https://dev-tooc5a5nck2ypxpw.us.auth0.com/userinfo")
|
||||||
|
// .userNameAttributeName("sub")
|
||||||
|
// .jwkSetUri("https://dev-tooc5a5nck2ypxpw.us.auth0.com/.well-known/jwks.json")
|
||||||
|
// .clientName("Auth0")
|
||||||
|
// .authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
|
||||||
|
// .scope("openid", "profile", "email")
|
||||||
|
// .build();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,12 +148,13 @@ spring:
|
|||||||
client:
|
client:
|
||||||
provider:
|
provider:
|
||||||
oidc:
|
oidc:
|
||||||
issuer-uri: http://localhost:9080/realms/jhipster
|
# make sure to include the ending slash!
|
||||||
|
issuer-uri: https://dev-tooc5a5nck2ypxpw.us.auth0.com/
|
||||||
registration:
|
registration:
|
||||||
oidc:
|
oidc:
|
||||||
client-id: web_app
|
client-id: 42r6XuNTM1jRB9M2LLTjoyap4HBmXByO
|
||||||
client-secret: web_app
|
client-secret: F-AAsTTSOKx8bkPRrM4vCaMdv-hyLI6yjWcJE7Kh-Y2QKLcqssn0mmKk-6TQGezy
|
||||||
scope: openid, profile, email, offline_access # last one for refresh tokens
|
scope: openid,profile,email
|
||||||
task:
|
task:
|
||||||
execution:
|
execution:
|
||||||
thread-name-prefix: sasiedzi-task-
|
thread-name-prefix: sasiedzi-task-
|
||||||
@@ -217,11 +218,8 @@ jhipster:
|
|||||||
license: unlicensed
|
license: unlicensed
|
||||||
license-url:
|
license-url:
|
||||||
security:
|
security:
|
||||||
content-security-policy: "default-src 'self'; frame-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"
|
|
||||||
oauth2:
|
oauth2:
|
||||||
audience:
|
audience: https://dev-tooc5a5nck2ypxpw.us.auth0.com/api/v2/
|
||||||
- account
|
|
||||||
- api://default
|
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
# Application specific properties
|
# Application specific properties
|
||||||
# Add your own application properties here, see the ApplicationProperties class
|
# Add your own application properties here, see the ApplicationProperties class
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
<logger name="com.sasiedzi.event" level="INFO"/>
|
<logger name="com.sasiedzi.event" level="INFO"/>
|
||||||
|
|
||||||
|
<logger name="javax.management" level="WARN"/>
|
||||||
<logger name="angus.activation" level="WARN"/>
|
<logger name="angus.activation" level="WARN"/>
|
||||||
<logger name="jakarta.activation" level="WARN"/>
|
<logger name="jakarta.activation" level="WARN"/>
|
||||||
<logger name="jakarta.mail" level="WARN"/>
|
<logger name="jakarta.mail" level="WARN"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user