@uniroma1/auth2
v1.0.2
Published
Il_microservizo_AUTH_si_occupa_dellautenticazione_e_dellautorizzazione_verso_una_generica_risorsa_accessibilie_attraverso_protocollo_HTTP__Il_microservizoo_auth_utilizza_il_DB_auth_Wiki_httpssrv01_cars_uniroma1_itwikiindex_phptitleAuth_microservizi
Downloads
5
Readme
auth
Auth - JavaScript client for auth Il microservizo "AUTH" si occupa dell'autenticazione e dell'autorizzazione verso una generica risorsa accessibilie attraverso protocollo HTTP. Il microservizoo auth utilizza il DB auth. Wiki: https://srv01.cars.uniroma1.it/wiki/index.php?title=Auth_microservizi This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install auth --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your auth from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('auth')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var Auth = require('auth');
var api = new Auth.FiltersApi()
var param = "param_example"; // {String}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.filters(param, callback);
Documentation for API Endpoints
All URIs are relative to http://192.168.29.239:8892/api/auth
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- Auth.FiltersApi | filters | GET /filters/{param} | Get Active rules Auth.FiltersApi | getFilters | GET /filters | Get Active rules Auth.LoginApi | deleteSubjectRole | DELETE /sub/role/{cod} | Delete subject's role Auth.LoginApi | getRoles | GET /roles | List roles Auth.LoginApi | insert | POST /sub/role | Add subject's role Auth.LoginApi | listRoles | GET /sub/{subject}/roles | Get subject's roles Auth.LoginApi | login | POST /login/{provider} | Make login Auth.LoginApi | logout | DELETE /logout | Make Logout Auth.LoginApi | postApiAuthRole | POST /role | Add new role Auth.LoginApi | provider | PUT /provider/{provider}/{status} | Change provider status Auth.LoginApi | providers | GET /providers | List Providers Auth.LoginApi | putRole | PUT /{role}/{status} | Change role status Auth.LoginApi | putSubRoleCod | PUT /sub/role/{cod} | Update subject's role Auth.ProvidersApi | provider | PUT /provider/{provider}/{status} | Change provider status Auth.ProvidersApi | providers | GET /providers | List Providers Auth.RolesApi | deleteSubjectRole | DELETE /sub/role/{cod} | Delete subject's role Auth.RolesApi | getRoles | GET /roles | List roles Auth.RolesApi | insert | POST /sub/role | Add subject's role Auth.RolesApi | listRoles | GET /sub/{subject}/roles | Get subject's roles Auth.RolesApi | postApiAuthRole | POST /role | Add new role Auth.RolesApi | putRole | PUT /{role}/{status} | Change role status Auth.RolesApi | putSubRoleCod | PUT /sub/role/{cod} | Update subject's role Auth.TokensApi | changeStatus | PUT /token/{tokentype}/{status} | Change token status Auth.TokensApi | decode | GET /token/decode | Token decode and verify Auth.TokensApi | renew | PUT /token/renew | Renew Token Auth.TokensApi | tokens | GET /tokens | List tokens
Documentation for Models
- Auth.Body
- Auth.Body1
- Auth.Body2
- Auth.InlineResponse200
- Auth.InlineResponse2001
- Auth.InlineResponse2001Result
- Auth.InlineResponse2002
- Auth.InlineResponse2002Result
- Auth.InlineResponse2003
- Auth.InlineResponse2003Result
- Auth.InlineResponse2004
- Auth.InlineResponse2004Result
- Auth.InlineResponse2004ResultRoles
- Auth.InlineResponse2005
- Auth.InlineResponse2005Error
- Auth.InlineResponse2005Result
- Auth.InlineResponse200Result
- Auth.InlineResponse200ResultRules
- Auth.InlineResponse409
- Auth.InlineResponse4091
- Auth.InlineResponse4091Error
- Auth.ListProviders
- Auth.ListProvidersError
- Auth.ListProvidersResult
- Auth.ListProvidersResultProviders
- Auth.ListRoles
- Auth.ListRolesResult
- Auth.ListRolesResultRoles
- Auth.ListTokens
- Auth.ListTokensResult
- Auth.ListTokensResultTokens
- Auth.LoginReq
- Auth.LoginReqRequest
- Auth.LoginRes
- Auth.ResponseCommon
- Auth.ResponseCommonError
- Auth.RoleRequest
- Auth.SubroleRequest
Documentation for Authorization
All endpoints do not require authorization.