Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Auth JS Client for e-city
yarn add auth-js
npm i --save auth-js
import AuthJs, {TokenManager} from 'auth-js'
const baseURL = 'http://isse.paliari.com.br/app/rest'
const Auth = {
install (Vue, {TokenManager, baseURL}) {
const auth = AuthJs({tokenManager:TokenManager, appModule: 'nfse', baseURL})
Vue.prototype.$auth = auth
Vue.auth = auth
}
}
Vue.use(Auth, {TokenManager, baseURL})
Or with Cookie
import AuthJs, {CookieManager} from 'auth-js'
const baseURL = 'http://isse.paliari.com.br/app/rest'
const Auth = {
install (Vue, {CookieManager, baseURL}) {
const auth = AuthJs({tokenManager:CookieManager, appModule: 'nfse', baseURL})
Vue.prototype.$auth = auth
Vue.auth = auth
}
}
Vue.use(Auth, {CookieManager, baseURL})
All methods return the Promise instance.
this.$auth.signIn().then( response => {
// the response contains token and usuario e.g: {token: {...}, usuario: {...}}
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Sign out current session of user.
this.$auth.signOut().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Update current passowrd of user.
this.$auth.updatePassowrd().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Update account of user.
this.$auth.account().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Change image of perfil the user.
this.$auth.image().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Update address of user.
this.$auth.address().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Insert/Remove modules of user.
this.$auth.modules().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Get current user.
this.$auth.current().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
This project is licensed under MIT License
FAQs
Auth JS Client for e-city
The npm package auth-js receives a total of 6 weekly downloads. As such, auth-js popularity was classified as not popular.
We found that auth-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.