@ -49,13 +49,5 @@ public class App {
|
||||
mac.setSurname("Głowacki");
|
||||
mac.setRole(UserRoles.STUDENT);
|
||||
this.userService.save(mac);
|
||||
|
||||
User mar = new User();
|
||||
mar.setEmail("marwoz16@st.amu.edu.pl");
|
||||
mar.setName("Marcin");
|
||||
mar.setSurname("Woźniak");
|
||||
mar.setRole(UserRoles.ADMIN);
|
||||
this.userService.save(mar);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,9 @@ public class TokenController {
|
||||
|
||||
try {
|
||||
CasUserIdentity casUserIdentity = validator.validate();
|
||||
String authority = casUserIdentity.getEmail();
|
||||
String usosId = casUserIdentity.getUsosId();
|
||||
String authority = casUserIdentity.getEmail();
|
||||
this.userService.checkForUser(authority, usosId);
|
||||
String token = this.userService.login(authority);
|
||||
return new ResponseEntity<>(token, HttpStatus.OK);
|
||||
} catch (CasValidationExcepiton e) {
|
||||
|
Reference in New Issue
Block a user