Skip to content

Commit

Permalink
self registration a bit of cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Aug 3, 2023
1 parent 120f2fc commit 89acc0e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ public class PageRegistrationBase extends PageAdminLTE {
private static final String ID_DESCRIPTION = "formDescription";
private static final String ID_BACK = "back";

@SpringBean(name = "nonceAuthenticationEvaluator")
private AuthenticationEvaluator<NonceAuthenticationContext, UsernamePasswordAuthenticationToken> authenticationEvaluator;

private SelfRegistrationDto selfRegistrationDto;
private SelfRegistrationDto postAuthenticationDto;

Expand Down Expand Up @@ -196,8 +193,4 @@ public SelfRegistrationDto getPostAuthenticationConfiguration() {

}

public AuthenticationEvaluator<NonceAuthenticationContext, UsernamePasswordAuthenticationToken> getAuthenticationEvaluator() {
return authenticationEvaluator;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ public class PageRegistrationFinish extends PageRegistrationBase {

private static final String ID_LABEL_SUCCESS = "successLabel";
private static final String ID_LABEL_ERROR = "errorLabel";
private static final String ID_LINK_LOGIN = "linkToLogin";
private static final String ID_SUCCESS_PANEL = "successPanel";
private static final String ID_ERROR_PANEL = "errorPanel";

private static final String OPERATION_ASSIGN_DEFAULT_ROLES = DOT_CLASS + "assignDefaultRoles";
private static final String OPERATION_ASSIGN_ADDITIONAL_ROLE = DOT_CLASS + "assignAdditionalRole";
private static final String OPERATION_FINISH_REGISTRATION = DOT_CLASS + "finishRegistration";
private static final String OPERATION_CHECK_CREDENTIALS = DOT_CLASS + "checkCredentials";
private static final String OPERATION_REMOVE_NONCE_AND_SET_LIFECYCLE_STATE = DOT_CLASS + "removeNonceAndSetLifecycleState";

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ public abstract class SchemaConstants {
//GUI constants which are also used in the notifiers
public static final String WORK_ITEM_URL_PREFIX = "/admin/workItem?pathParameter=";
public static final String CASE_URL_PREFIX = "/admin/caseNew/";
public static final String REGISTRATION_CONFIRMATION_PREFIX = "/confirm/registration"; //todo remove in the future, seems to be an old implementation for self registration
public static final String REGISTRATION_PREFIX = "/registration";
public static final String PASSWORD_RESET_CONFIRMATION_PREFIX = "/confirm/reset";
public static final String ACCOUNT_ACTIVATION_PREFIX = "/activate/accounts";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ public boolean isSupportActivationByChannel() {

@Override
public Collection<Authorization> resolveAuthorities(Collection<Authorization> authorities) {
ArrayList<Authorization> newAuthorities = new ArrayList<>();
ArrayList<Authorization> newAuthorities = new ArrayList<>(authorities);
AuthorizationType authorizationBean = new AuthorizationType();
authorizationBean.getAction().add(AuthorizationConstants.AUTZ_UI_SELF_REGISTRATION_FINISH_URL);
Authorization selfServiceCredentialsAuthz = new Authorization(authorizationBean);
newAuthorities.add(selfServiceCredentialsAuthz);
authorities.addAll(newAuthorities);
return authorities;
return newAuthorities;
}
}

0 comments on commit 89acc0e

Please sign in to comment.