quasar-app-extension-sso-upc

2.2.3 • Public • Published

Quasar App Extension : SSO UPC

A Quasar extension for validate into UPC SSO authentication server and obtain a JWT with user profile from own API

Dependencies

  • Both axios as well as Vuex are required for this extension.

Require a server [api-cas-jwt] running for validate and return jwt

Install

Run extension

quasar ext add sso-upc

Prompts

The installation requests the routes to be used to communicate with the backend and adds them to the .env file so that they can be modified later

Funcionality

The authentication logic is performed inside a Vuex store. this.$auth provides a helper to access the functionality in the store and this.$api provides a instance for secure api calls.

Function Functionality
$auth.logout Logs out the current user and redirect to login page.
$auth.isLoggedIn Returns a boolean to determine if the user is logged in.
$auth.getProfile Get the complete profile of the auth Bearer JWT.
$auth.userData Get the user data send by optional own API profile.
$auth.isAdmin Returns a boolean to determine if the user has admin role.
$auth.personName Get the name of logged user.
$auth.personCompleteName Get the complete name of logged user.
$auth.personEmail Get the email of logged user.
$auth.userPhoto Get the photo of logged user.
$auth.hasRoles(roles) Returns a boolean to determine if the user has any of roles.

Uninstall

quasar ext remove sso-upc

Info

The profile data depends on the parameters returned by the API-CAS-JWT server

Readme

Keywords

none

Package Sidebar

Install

npm i quasar-app-extension-sso-upc

Weekly Downloads

3

Version

2.2.3

License

MIT

Unpacked Size

18.8 kB

Total Files

18

Last publish

Collaborators

  • jrest