SUPPORT-8427: Fix
This commit is contained in:
parent
9fd2d353f0
commit
d85ca0fd0c
4 changed files with 3 additions and 9 deletions
|
|
@ -1,9 +1,5 @@
|
|||
package ru.micord.ervu.security.esia.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import ru.cg.webbpm.modules.webkit.annotations.Model;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -348,12 +348,10 @@ public class EsiaAuthService {
|
|||
}
|
||||
String logoutUrl = esiaConfig.getLogoutUrl();
|
||||
String redirectUrl = esiaConfig.getRedirectUrl();
|
||||
String redirectUrlEncoded = redirectUrl.replaceAll(":", "%3A")
|
||||
.replaceAll("/", "%2F");
|
||||
URL url = new URL(logoutUrl);
|
||||
Map<String, String> params = mapOf(
|
||||
"client_id", esiaConfig.getClientId(),
|
||||
"redirect_uri", redirectUrlEncoded);
|
||||
"redirect_url", redirectUrl);
|
||||
return makeRequest(url, params);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import {AnalyticalScope, Behavior, Container, ControlWithValue} from "@webbpm/base-package";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {PersonData} from "./PersonData";
|
||||
import {PersonModel} from "../generated/ru/micord/security/esia/model/PersonDataModel";
|
||||
import {CookieService} from "ngx-cookie";
|
||||
import {PersonDataModel} from "../generated/ru/micord/ervu/security/esia/model/PersonDataModel";
|
||||
|
||||
@AnalyticalScope(Container)
|
||||
export class PersonDataRoot extends Behavior{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export abstract class AuthGuard implements CanActivate {
|
|||
else if (code) {
|
||||
const params = new HttpParams().set('code', code);
|
||||
this.httpClient.get<boolean>("esia/auth", {params: params}).toPromise().then(
|
||||
() => window.open(url.origin, "_self"))
|
||||
() => window.open(url.origin + url.pathname, "_self"))
|
||||
.catch((reason) =>
|
||||
console.error(reason)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue