32 lines
584 B
TypeScript
32 lines
584 B
TypeScript
import { Injectable, OnInit } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
import { TokenService, TokenProvider } from '../login/token.service'
|
|
import { HttpClient , HttpHeaders, HttpParams} from '@angular/common/http';
|
|
import {RestBase} from '../rest-base';
|
|
|
|
@Injectable()
|
|
export class NativeLoginService implements OnInit {
|
|
|
|
|
|
constructor(private restBase: RestBase) {
|
|
}
|
|
|
|
ngOnInit(){
|
|
|
|
}
|
|
|
|
|
|
login(username, password){
|
|
var credentials = {"username": username, "password":password};
|
|
return this.restBase.login("nativeLogin", credentials);
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|