You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChustaSoft Authorization provides a npm package (@chustasoft/cs-authorization-connector) that allow a frontend to connect with the exposed Controller actions of the AspNet package.
This package is developed purely in TypeScript, so the package can easily integrated in any kind of JavaScript project.
The package provides:
AuthorizationService: Connection service with the WebApi
Recommended usage of Service with Angular injection:
import{Injectable,Inject}from'@angular/core';import{AuthorizationService}from'@chustasoft/cs-authorization-connector';
@Injectable({providedIn: 'root'})exportclassAuthServiceextendsAuthorizationService{//Could it be environment file inestadconstructor(@Inject('BASE_URL')baseUrl: string){super(baseUrl);}}
With this approach, we will be both injecting the necessary configuration of the base URL of the API to the connector service, and adding the service to the Angular DI Container, therefore available for any component.
You will be able to found a complete example with Backend + Frontend, using Nuget packages and npm connector here