[DEV] correct the connection
This commit is contained in:
parent
7f7b73ec51
commit
6f96c0b929
@ -70,7 +70,7 @@ RUN apk add --no-cache wget
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
COPY --from=buildBack /tmp/out/maven/*.jar /application/application.jar
|
||||
COPY --from=buildFront /tmp/dist /application/karideo/
|
||||
COPY --from=buildFront /tmp/dist /application/front/
|
||||
|
||||
WORKDIR /application/
|
||||
|
||||
|
@ -58,14 +58,17 @@ export class AppComponent implements OnInit {
|
||||
self.isConnected = isConnected;
|
||||
self.autoConnectedDone = true;
|
||||
self.updateMainMenu();
|
||||
if (isConnected) {
|
||||
console.log("Is connected then back to the requested page")
|
||||
self.router.navigateByUrl(self.location);
|
||||
console.log(`update global URL = ${self.location}`);
|
||||
}
|
||||
});
|
||||
this.ssoService.checkSignUpEnable()
|
||||
.then((value: boolean) => {
|
||||
console.log(`Get value signUp = ${value}`);
|
||||
self.signUpEnable = value;
|
||||
self.updateMainMenu();
|
||||
self.router.navigateByUrl(self.location);
|
||||
console.log(`update global URL = ${self.location}`);
|
||||
}).catch((error: any) => {
|
||||
console.log(`Can not call the sso to check the sign-up_interface: ${error}`);
|
||||
});
|
||||
|
@ -48,7 +48,7 @@ export class SessionService {
|
||||
userBlocked: boolean;
|
||||
userRemoved: boolean;
|
||||
userAvatar: string;
|
||||
tokenJwt?: string;
|
||||
tokenJwt: string;
|
||||
}) {
|
||||
console.log(`Session Create: userId=${userId} userLogin=${userLogin} userEMail=${userEMail} userAdmin=${userAdmin} userAvatar=${userAvatar} sessionId = ${sessionId} tokenJwt = ${tokenJwt}`);
|
||||
this.tokenJwt = tokenJwt;
|
||||
@ -76,9 +76,6 @@ export class SessionService {
|
||||
this.userAvatar = null;
|
||||
this.change.emit(false);
|
||||
}
|
||||
setToken(jwt: string) {
|
||||
this.tokenJwt = jwt;
|
||||
}
|
||||
getToken(): string | undefined {
|
||||
return this.tokenJwt;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ export class SSOService {
|
||||
* Request SSO connection
|
||||
*/
|
||||
hashLocalData(data?: string): string {
|
||||
if (!isNullOrUndefined(data) && !isInArray(data, ["", "null", "NULL", "undefined", "---"])) {
|
||||
if (!isNullOrUndefined(data) && !isInArray(data, ["", "null", "NULL", "undefined", "---", "unregistered", "unregistered/", "forbidden", "forbidden/"])) {
|
||||
return this.utf8_to_b64(data);
|
||||
}
|
||||
let pathName = window.location.pathname;
|
||||
|
@ -146,8 +146,6 @@ export class UserService {
|
||||
if(rememberMe === true) {
|
||||
self.storageService.set(self.cookiesRememberMe, rememberMe?"true":"false");
|
||||
}
|
||||
// transfer the session token property
|
||||
self.sessionService.setToken(token);
|
||||
if (isNullOrUndefined(environment.tokenStoredInPermanentStorage) || environment.tokenStoredInPermanentStorage !== true) {
|
||||
self.storageService.setSession(self.cookiesToken, token);
|
||||
} else {
|
||||
@ -182,7 +180,8 @@ export class UserService {
|
||||
userAdmin: response.data.admin,
|
||||
userBlocked: response.data.blocked,
|
||||
userRemoved: response.data.removed,
|
||||
userAvatar: response.data.avatar
|
||||
userAvatar: response.data.avatar,
|
||||
tokenJwt: token,
|
||||
});
|
||||
resolve(true);
|
||||
}).catch((error:any) => {
|
||||
|
@ -55,5 +55,5 @@ const environment_hybrid = {
|
||||
};
|
||||
|
||||
|
||||
export const environment = environment_local;
|
||||
export const environment = environment_back_prod;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user