F
F
fanhypermax2018-02-08 07:10:29
JavaScript
fanhypermax, 2018-02-08 07:10:29

How to make an authorization?

There is a chrome app store. As in it it is possible to implement authorization

For example there is a code.

//Авторизируюсь
$.ajax({
    'url': Url + "/auth/",
    'headers': {
        'X-Requested-With': 'XMLHttpRequest',
        'Content-Type': 'application/json'
    },
    'method': 'post',
    'dataType': 'json',
    'data': {
        'login': Login,
        'password':Pass
    }, 'success': function(d) { //... }});


Next, let's say I want to get data from the profile, but writes log in.

$.ajax({
    'url': Url + "/profile/",
    'headers': {
        'X-Requested-With': 'XMLHttpRequest',
        'Content-Type': 'application/json'
    },
    'method': 'post',
    'dataType': 'json',
    'success': function(d) {  //... }
});


How to make a session, or something like that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ainur Valiev, 2018-02-08
@vaajnur

I don’t know how in the chrome app store, but usually it works like this:
1. log in, get session_id
2. all requests in lich. you make an office with the session_id parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question