Switch authentication to OAuth 2 #27
@ -2,6 +2,11 @@
|
||||
The web GUI is protected by OAuth 2 log in. Run the Docker Compose containers with
|
||||
`docker compose up` to start the authorization server to be able to log in.
|
||||
|
||||
If you run SciPro in development mode (DEV profile) you will be able to log in
|
||||
as the "default" OAuth 2 user populated in the upper form. If you have other
|
||||
data in your database you will have to use the lower form and specify a valid
|
||||
username in the principal field.
|
||||
|
||||
## Working with the API
|
||||
The API is protected by OAuth 2 acting as a [resource server](https://www.oauth.com/oauth2-servers/the-resource-server/)
|
||||
verifying tokens using [token introspection](https://datatracker.ietf.org/doc/html/rfc7662).
|
||||
|
@ -200,6 +200,10 @@ public class DataInitializer implements Lifecycle {
|
||||
admin.addRole(Roles.SYSADMIN);
|
||||
createBeta(admin);
|
||||
passwordService.updatePassword(admin, "aey7ru8aefei0jaW2wo9eX8EiShi0aan");
|
||||
Username defaultOAuth2Principal = new Username();
|
||||
defaultOAuth2Principal.setUsername("dev@localhost");
|
||||
defaultOAuth2Principal.setUser(admin);
|
||||
save(defaultOAuth2Principal);
|
||||
}
|
||||
|
||||
private void createBeta(User user) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user