2022-05-03 08:59:36 +00:00
|
|
|
<!doctype html>
|
|
|
|
<html class="no-js" lang="">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
|
|
<title>aktienbot documentation</title>
|
|
|
|
<meta name="description" content="">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
|
|
|
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
|
2022-05-10 11:03:10 +00:00
|
|
|
<link rel="stylesheet" href="../styles/style.css">
|
2022-05-03 08:59:36 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="navbar navbar-default navbar-fixed-top visible-xs">
|
|
|
|
<a href="../" class="navbar-brand">aktienbot documentation</a>
|
2022-05-10 11:03:10 +00:00
|
|
|
<button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
|
2022-05-03 08:59:36 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="xs-menu menu" id="mobile-menu">
|
2022-05-10 11:03:10 +00:00
|
|
|
<div id="book-search-input" role="search">
|
|
|
|
<input type="text" placeholder="Type to search">
|
|
|
|
</div>
|
|
|
|
<nav>
|
|
|
|
|
|
|
|
<ul class="list">
|
|
|
|
|
|
|
|
<li class="title">
|
|
|
|
<a href="../">aktienbot documentation</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
|
|
|
<ul class="links">
|
|
|
|
<li class="link">
|
|
|
|
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a
|
|
|
|
|
|
|
|
href="../overview.html"
|
|
|
|
href="../overview.html"
|
|
|
|
>
|
|
|
|
<span class="fa fa-th"></span>Overview
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="./modules.html" >
|
|
|
|
<span class="fa fa-archive"></span>
|
|
|
|
<span>Modules</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#xs-modules-links"
|
|
|
|
></span>
|
|
|
|
</a>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="xs-modules-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../modules/AppModule.html" >AppModule</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<div class="simple">
|
|
|
|
<span class="fa fa-cogs"></span>
|
|
|
|
<span>Components</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#xs-components-links"
|
|
|
|
></span>
|
|
|
|
</div>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="xs-components-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/AppComponent.html" >AppComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<div class="simple">
|
|
|
|
<span class="fa fa-long-arrow-down"></span>
|
|
|
|
<span>Injectables</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#xs-injectables-links"
|
|
|
|
></span>
|
|
|
|
</div>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="xs-injectables-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/AuthService.html" class="active" >AuthService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/BotService.html" >BotService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/DataService.html" >DataService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/HelperService.html" >HelperService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<div class="simple">
|
|
|
|
<span class="fa fa-info"></span>
|
|
|
|
<span>Interfaces</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#xs-interfaces-links"
|
|
|
|
></span>
|
|
|
|
</div>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="xs-interfaces-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/Keyword.html" >Keyword</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/Share.html" >Share</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/Stock.html" >Stock</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li class="copyright">
|
|
|
|
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
|
|
|
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</nav>
|
2022-05-03 08:59:36 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container-fluid main">
|
|
|
|
<div class="row main">
|
|
|
|
<div class="hidden-xs menu">
|
2022-05-10 11:03:10 +00:00
|
|
|
<nav>
|
|
|
|
|
|
|
|
<ul class="list">
|
|
|
|
|
|
|
|
<li class="title">
|
|
|
|
<a href="../">aktienbot documentation</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
|
|
|
|
<div id="book-search-input" role="search">
|
|
|
|
<input type="text" placeholder="Type to search">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
|
|
|
|
<ul class="links">
|
|
|
|
<li class="link">
|
|
|
|
<a href="../" ><span class="fa fa-file-text-o"></span>README</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a
|
|
|
|
|
|
|
|
href="../overview.html"
|
|
|
|
href="../overview.html"
|
|
|
|
>
|
|
|
|
<span class="fa fa-th"></span>Overview
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="./modules.html" >
|
|
|
|
<span class="fa fa-archive"></span>
|
|
|
|
<span>Modules</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#modules-links"
|
|
|
|
></span>
|
|
|
|
</a>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="modules-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../modules/AppModule.html" >AppModule</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<div class="simple">
|
|
|
|
<span class="fa fa-cogs"></span>
|
|
|
|
<span>Components</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#components-links"
|
|
|
|
></span>
|
|
|
|
</div>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="components-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/AppComponent.html" >AppComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/BotSettingsComponent.html" >BotSettingsComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/ConfirmationDialogComponent.html" >ConfirmationDialogComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/DashboardComponent.html" >DashboardComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/HeaderComponent.html" >HeaderComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/HelpDialogComponent.html" >HelpDialogComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/LoginComponent.html" >LoginComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/ProfileComponent.html" >ProfileComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/RegisterComponent.html" >RegisterComponent</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../components/UserDialogComponent.html" >UserDialogComponent</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<div class="simple">
|
|
|
|
<span class="fa fa-long-arrow-down"></span>
|
|
|
|
<span>Injectables</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#injectables-links"
|
|
|
|
></span>
|
|
|
|
</div>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="injectables-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/AuthInterceptor.html" >AuthInterceptor</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/AuthService.html" class="active" >AuthService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/BotService.html" >BotService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/DataService.html" >DataService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/HelperService.html" >HelperService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/ProfileService.html" >ProfileService</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../injectables/TokenStorageService.html" >TokenStorageService</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<div class="simple">
|
|
|
|
<span class="fa fa-info"></span>
|
|
|
|
<span>Interfaces</span>
|
|
|
|
<span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
|
|
|
|
data-target="#interfaces-links"
|
|
|
|
></span>
|
|
|
|
</div>
|
|
|
|
<ul class="links collapse in"
|
|
|
|
id="interfaces-links"
|
|
|
|
>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/Keyword.html" >Keyword</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/Share.html" >Share</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/Stock.html" >Stock</a>
|
|
|
|
</li>
|
|
|
|
<li class="link">
|
|
|
|
<a href="../interfaces/TransactionData.html" >TransactionData</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="../miscellaneous.html" ><span class="fa fa-cubes"></span>Miscellaneous</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="chapter">
|
|
|
|
<a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li class="copyright">
|
|
|
|
Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
|
|
|
|
<img src="..//images/compodoc-vectorise.svg" class="img-responsive">
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</nav>
|
2022-05-03 08:59:36 +00:00
|
|
|
</div>
|
|
|
|
<div class="content injectable">
|
|
|
|
<div class="content-data">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li>Injectables</li>
|
2022-05-10 11:03:10 +00:00
|
|
|
<li>AuthService</li>
|
2022-05-03 08:59:36 +00:00
|
|
|
</ol>
|
|
|
|
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
2022-05-10 11:03:10 +00:00
|
|
|
<li class="active">
|
|
|
|
<a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
|
|
|
|
</li>
|
2022-05-03 08:59:36 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
2022-05-10 11:03:10 +00:00
|
|
|
<div class="tab-pane fade active in" id="infos">
|
2022-05-03 08:59:36 +00:00
|
|
|
<p class="comment">
|
|
|
|
<h3>File</h3>
|
|
|
|
</p>
|
|
|
|
<p class="comment">
|
|
|
|
<code>src/app/Services/auth.service.ts</code>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
2022-05-10 11:03:10 +00:00
|
|
|
<h3 id="constructor">Constructor</h3>
|
|
|
|
<table class="table table-sm table-bordered">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="col-md-4">
|
|
|
|
<code>constructor(http: HttpClient)</code>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
|
|
|
<section>
|
2022-05-10 11:03:10 +00:00
|
|
|
<h3 id="methods">Methods</h3>
|
|
|
|
<table class="table table-sm table-bordered">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="col-md-4">
|
|
|
|
<b> login</b>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="col-md-4">
|
|
|
|
<code>login(email: string, password: string)</code>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="col-md-4">
|
|
|
|
<div class="io-description"><p>Function to login user</p>
|
|
|
|
</div>
|
|
|
|
<div class="io-description">
|
|
|
|
<b>Parameters :</b>
|
|
|
|
<ul class="jsdoc-params">
|
|
|
|
<li>
|
|
|
|
<div>
|
|
|
|
<b>email</b>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div>
|
|
|
|
<b>password</b>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="io-description">
|
|
|
|
<b>Returns: </b> <code>any</code>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="io-description">
|
|
|
|
<p>Observable</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<table class="table table-sm table-bordered">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="col-md-4">
|
|
|
|
<b> register</b>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="col-md-4">
|
|
|
|
<code>register(email: string, username: string, password: string)</code>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="col-md-4">
|
|
|
|
<div class="io-description"><p>Function to register user</p>
|
|
|
|
</div>
|
|
|
|
<div class="io-description">
|
|
|
|
<b>Parameters :</b>
|
|
|
|
<ul class="jsdoc-params">
|
|
|
|
<li>
|
|
|
|
<div>
|
|
|
|
<b>email</b>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div>
|
|
|
|
<b>username</b>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<div>
|
|
|
|
<b>password</b>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="io-description">
|
|
|
|
<b>Returns: </b> <code>any</code>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="io-description">
|
|
|
|
<p>Observable</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
|
|
|
</div>
|
2022-05-10 11:03:10 +00:00
|
|
|
<div class="tab-pane fade tab-source-code" id="source">
|
|
|
|
<pre><code class="hljs javascript">import { Injectable } from '@angular/core';
|
2022-05-03 08:59:36 +00:00
|
|
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
const AUTH_API = 'https://gruppe1.testsites.info/api/user';
|
|
|
|
|
|
|
|
const httpOptions = {
|
|
|
|
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
|
|
|
|
};
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
providedIn: 'root',
|
|
|
|
})
|
|
|
|
export class AuthService {
|
|
|
|
constructor(private http: HttpClient) {}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to login user
|
2022-05-03 08:59:36 +00:00
|
|
|
* @param {string} email
|
|
|
|
* @param {string} password
|
|
|
|
* @returns Observable
|
|
|
|
*/
|
|
|
|
login(email: string, password: string): Observable<any> {
|
|
|
|
return this.http.post(AUTH_API + '/login', {
|
|
|
|
email,
|
|
|
|
password,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2022-05-10 11:03:10 +00:00
|
|
|
* Function to register user
|
2022-05-03 08:59:36 +00:00
|
|
|
* @param {string} email
|
|
|
|
* @param {string} username
|
|
|
|
* @param {string} password
|
|
|
|
* @returns Observable
|
|
|
|
*/
|
|
|
|
register(email: string, username: string, password: string): Observable<any> {
|
|
|
|
return this.http.post(
|
|
|
|
AUTH_API + '/register',
|
|
|
|
{
|
|
|
|
email,
|
|
|
|
password,
|
|
|
|
username,
|
|
|
|
},
|
|
|
|
httpOptions
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</code></pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><div class="search-results">
|
|
|
|
<div class="has-results">
|
|
|
|
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
|
|
<ul class="search-results-list"></ul>
|
|
|
|
</div>
|
|
|
|
<div class="no-results">
|
|
|
|
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="../js/libs/bootstrap-native.js"></script>
|
|
|
|
|
|
|
|
<script src="../js/libs/es6-shim.min.js"></script>
|
|
|
|
<script src="../js/libs/EventDispatcher.js"></script>
|
|
|
|
<script src="../js/libs/promise.min.js"></script>
|
|
|
|
<script src="../js/libs/zepto.min.js"></script>
|
|
|
|
|
|
|
|
<script src="../js/compodoc.js"></script>
|
|
|
|
|
2022-05-10 11:03:10 +00:00
|
|
|
<script src="../js/search/search.js"></script>
|
|
|
|
<script src="../js/search/lunr.min.js"></script>
|
|
|
|
<script src="../js/search/search-lunr.js"></script>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
2022-05-10 11:03:10 +00:00
|
|
|
<script src="../js/menu.js"></script>
|
|
|
|
<script src="../js/libs/highlight.pack.js"></script>
|
|
|
|
<script src="../js/libs/highlightjs-line-numbers.min.js"></script>
|
|
|
|
<script src="../js/search/search_index.js"></script>
|
|
|
|
<script>
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
hljs.initHighlightingOnLoad();
|
|
|
|
hljs.initLineNumbersOnLoad();
|
|
|
|
});
|
|
|
|
</script>
|
2022-05-03 08:59:36 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|