https
This commit is contained in:
@ -8,7 +8,7 @@ export class AuthService {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
async checkRequest(request: Request): Promise<boolean> {
|
async checkRequest(request: Request): Promise<boolean> {
|
||||||
const {data} = await this.http.post('http://api.auth.vigdorov.ru/auth/check', {
|
const {data} = await this.http.post('https://api.auth.vigdorov.ru/auth/check', {
|
||||||
access_token: request.headers.authorization,
|
access_token: request.headers.authorization,
|
||||||
agent: request.headers['user-agent']
|
agent: request.headers['user-agent']
|
||||||
}).toPromise();
|
}).toPromise();
|
||||||
|
|||||||
@ -76,7 +76,7 @@ export class StoreService {
|
|||||||
|
|
||||||
const {login, agent} = jwt.decode(access_token) as Token;
|
const {login, agent} = jwt.decode(access_token) as Token;
|
||||||
|
|
||||||
const apiPath = 'http://api.auth.vigdorov.ru/users/search/';
|
const apiPath = 'https://api.auth.vigdorov.ru/users/search/';
|
||||||
const headers = {
|
const headers = {
|
||||||
Authorization: access_token,
|
Authorization: access_token,
|
||||||
'user-agent': agent
|
'user-agent': agent
|
||||||
@ -117,7 +117,7 @@ export class StoreService {
|
|||||||
|
|
||||||
async loadUserByToken(access_token: string): Promise<User> {
|
async loadUserByToken(access_token: string): Promise<User> {
|
||||||
const {login, agent} = jwt.decode(access_token) as Token;
|
const {login, agent} = jwt.decode(access_token) as Token;
|
||||||
const apiPath = 'http://api.auth.vigdorov.ru/users/search/';
|
const apiPath = 'https://api.auth.vigdorov.ru/users/search/';
|
||||||
const headers = {
|
const headers = {
|
||||||
Authorization: access_token,
|
Authorization: access_token,
|
||||||
'user-agent': agent
|
'user-agent': agent
|
||||||
|
|||||||
Reference in New Issue
Block a user