Outh working!. Pending:
- Test all databases - Migration Scripts - Manage error due to changing of authentication schemas. - Link from the login page. - What happend with the logout ?.
This commit is contained in:
@@ -20,6 +20,7 @@ package com.wisemapping.security;
|
||||
|
||||
|
||||
import com.wisemapping.exceptions.WiseMappingException;
|
||||
import com.wisemapping.model.AuthenticationSchema;
|
||||
import com.wisemapping.model.User;
|
||||
import com.wisemapping.service.UserService;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -62,6 +63,7 @@ public class UserDetailsService
|
||||
result = dbUser;
|
||||
} else {
|
||||
try {
|
||||
tUser.setAuthenticationSchema(AuthenticationSchema.OPENID);
|
||||
result = userService.createUser(tUser, false, false);
|
||||
} catch (WiseMappingException e) {
|
||||
throw new IllegalStateException(e);
|
||||
|
@@ -2,6 +2,7 @@ package com.wisemapping.security.ldap;
|
||||
|
||||
|
||||
import com.wisemapping.exceptions.WiseMappingException;
|
||||
import com.wisemapping.model.AuthenticationSchema;
|
||||
import com.wisemapping.model.User;
|
||||
import com.wisemapping.security.UserDetails;
|
||||
import com.wisemapping.service.UserService;
|
||||
@@ -64,6 +65,7 @@ public class LdapUserDetailsContextMapper implements UserDetailsContextMapper {
|
||||
user.setActivationDate(now);
|
||||
|
||||
try {
|
||||
user.setAuthenticationSchema(AuthenticationSchema.LDAP);
|
||||
user = userService.createUser(user, false, false);
|
||||
} catch (WiseMappingException e) {
|
||||
throw new IllegalStateException(e);
|
||||
|
Reference in New Issue
Block a user