Added button for empty post login call

This commit is contained in:
Julius Gruber
2019-06-18 10:15:59 +02:00
parent 9a2b22943e
commit a36aa50d16
3 changed files with 17 additions and 1 deletions

View File

@@ -38,6 +38,10 @@ export class AuthInterceptor implements HttpInterceptor {
return response.status === 405;
}
private is302Response(response: HttpResponseBase): boolean {
return response.status === 302;
}
private isUnauthorized(response: HttpResponseBase): boolean {
// invalid_token The access token provided is expired, revoked, malformed, or invalid for other reasons
return response.status === 401;

View File

@@ -34,6 +34,12 @@
</div>
<div >
<br>
<a class="btn btn-lg btn-primary btn-block mt-2" (click)="postLoginCall()" role="button">Simple Post Login</a>
</div>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">{{"login.form.new-user" | translate}}</a>

View File

@@ -206,4 +206,10 @@ export class LogInComponent implements OnDestroy, OnInit {
// clear form
this.form.reset();
}
postLoginCall() {
const email = '';
const password = '';
this.store.dispatch(new AuthenticateAction(email, password));
}
}