Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dat 249 bring back swagger #271

Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions datasafe-rest-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
</properties>

<dependencies>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.3.0</version>
Borelli-7 marked this conversation as resolved.
Show resolved Hide resolved
</dependency>
<dependency>
<groupId>de.adorsys</groupId>
<artifactId>datasafe-business</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public SecurityFilterChain filterChain(HttpSecurity http, MvcRequestMatcher.Buil
.requestMatchers(SWAGGER_RESOURCES).permitAll()
.requestMatchers(mvc.pattern("/static/**")).permitAll()
.requestMatchers(mvc.pattern(SecurityConstants.AUTH_LOGIN_URL)).permitAll()
.requestMatchers(mvc.pattern(HttpMethod.OPTIONS, "/**")).permitAll()
.requestMatchers(mvc.pattern(HttpMethod.GET, "/**")).permitAll()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that frontend works! I think Options is needed for cors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked. Frontend also works after this update. I created another branch and I made the same update. everything is working. But now i must to close this PR and pull another one because there is probably some file missing in the frontend part.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can rebase your branch on top of add_ECDH

.anyRequest().authenticated()
)
.addFilter(new JwtAuthorizationFilter(authenticationManager, securityProperties))
Expand Down
12 changes: 7 additions & 5 deletions datasafe-rest-impl/src/main/resources/jwt-config.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
jwt_secret=${JWT_SECRET}
default_user=${DEFAULT_USER}
default_password=${DEFAULT_PASSWORD}
#10 Days in ms
token_expiration=${TOKEN_EXPIRATION:864000000}
debug=false
management.endpoints.web.exposure.include=*

jwt_secret=n2r5u8x/A%D*G-KaPdSgVkYp3s6v9y$B&E(H+MbQeThWmZq4t7w!z%C*F-J@NcRf
default_user=username
default_password=password
token_expiration=864000000
Borelli-7 marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 3 additions & 3 deletions frontend/datasafe-ui/src/env.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(function (window) {
window.__env = window.__env || {};

window.__env.apiUrl = '${API_URL}';
window.__env.apiUrl = 'http://localhost:8080';
// ideally these are not necessary, but API is protected, so supplying it for docker-local deployment
window.__env.apiUsername = '${API_USERNAME}';
window.__env.apiPassword = '${API_PASSWORD}';
window.__env.apiUsername = 'username';
window.__env.apiPassword = 'password';
Borelli-7 marked this conversation as resolved.
Show resolved Hide resolved

}(this));