javascript token things
This commit is contained in:
@ -32,6 +32,18 @@ usimp.chooseDomainServer = function (domainServers, invalidDomainServers = []) {
|
||||
return domainServers[0];
|
||||
}
|
||||
|
||||
usimp.login = function (domainServer, accountName, password) {
|
||||
return fetch(``)
|
||||
usimp.login = function (domainServer, domain, account, password) {
|
||||
return fetch('http://' + domainServer.host + ':' + domainServer.protocols.http + '/_usimp/authenticate', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'To-Domain': domain,
|
||||
'From-Domain': domain
|
||||
},
|
||||
body: JSON.stringify({
|
||||
type: "password",
|
||||
name: account,
|
||||
password: password,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user