-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to use keycloak in a stateless way
- Loading branch information
Showing
61 changed files
with
1,742 additions
and
569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "Task", | ||
"fields": [ | ||
{ | ||
"fieldName": "name", | ||
"fieldType": "String", | ||
"fieldValidateRules": [ | ||
"required" | ||
] | ||
}, | ||
{ | ||
"fieldName": "description", | ||
"fieldType": "String", | ||
"fieldValidateRules": [ | ||
"required" | ||
] | ||
} | ||
], | ||
"relationships": [], | ||
"changelogDate": "20181217152237", | ||
"entityTableName": "task", | ||
"dto": "no", | ||
"pagination": "no", | ||
"service": "no", | ||
"jpaMetamodelFiltering": false, | ||
"fluentMethods": true, | ||
"clientRootFolder": "", | ||
"applications": "*", | ||
"microserviceName": "micro" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
src/main/java/com/mycompany/myapp/client/AuthorizedFeignClient.java
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
src/main/java/com/mycompany/myapp/client/OAuth2InterceptedFeignConfiguration.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
src/main/java/com/mycompany/myapp/client/TokenRelayRequestInterceptor.java
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
src/main/java/com/mycompany/myapp/client/UserFeignClientInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.mycompany.myapp.client; | ||
|
||
import com.mycompany.myapp.security.SecurityUtils; | ||
import feign.RequestInterceptor; | ||
import feign.RequestTemplate; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class UserFeignClientInterceptor implements RequestInterceptor { | ||
private static final String AUTHORIZATION_HEADER = "Authorization"; | ||
private static final String BEARER = "Bearer"; | ||
|
||
@Override | ||
public void apply(RequestTemplate template) { | ||
SecurityUtils.getCurrentUserJWT() | ||
.ifPresent(s -> template.header(AUTHORIZATION_HEADER,String.format("%s %s", BEARER, s))); | ||
} | ||
} |
100 changes: 0 additions & 100 deletions
100
src/main/java/com/mycompany/myapp/config/OAuth2Configuration.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.