/** * Registration * * @param code * @return */ @Path(REGISTRATION_PATH) @POST public Response processRegister( @QueryParam("code") String code, @QueryParam("execution") String execution) { event.event(EventType.REGISTER); if (!realm.isRegistrationAllowed()) { event.error(Errors.REGISTRATION_DISABLED); return ErrorPage.error(session, Messages.REGISTRATION_NOT_ALLOWED); } Checks checks = new Checks(); if (!checks.verifyCode(code, ClientSessionModel.Action.AUTHENTICATE.name())) { return checks.response; } ClientSessionCode clientCode = checks.clientCode; ClientSessionModel clientSession = clientCode.getClientSession(); return processRegistration(execution, clientSession, null); }
/** * protocol independent registration page entry point * * @param code * @return */ @Path(REGISTRATION_PATH) @GET public Response registerPage( @QueryParam("code") String code, @QueryParam("execution") String execution) { event.event(EventType.REGISTER); if (!realm.isRegistrationAllowed()) { event.error(Errors.REGISTRATION_DISABLED); return ErrorPage.error(session, Messages.REGISTRATION_NOT_ALLOWED); } Checks checks = new Checks(); if (!checks.verifyCode(code, ClientSessionModel.Action.AUTHENTICATE.name())) { return checks.response; } event.detail(Details.CODE_ID, code); ClientSessionCode clientSessionCode = checks.clientCode; ClientSessionModel clientSession = clientSessionCode.getClientSession(); authManager.expireIdentityCookie(realm, uriInfo, clientConnection); return processRegistration(execution, clientSession, null); }