!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/local/lib/node_modules/pm2/node_modules/@pm2/js-api/src/auth_strategies/   drwxr-xr-x
Free 13.02 GB of 57.97 GB (22.47%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     strategy.js (1.76 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
'use strict'

const constants = require('../../constants.js')

const AuthStrategy = class AuthStrategy {
  constructor (opts) {
    this._opts = opts
    this.client_id = opts.client_id || opts.OAUTH_CLIENT_ID
    if (!this.client_id) {
      throw new Error('You must always provide a application id for any of the strategies')
    }
    this.scope = opts.scope || 'all'
    this.response_mode = opts.reponse_mode || 'query'

    let optsOauthEndpoint = null
    if (opts && opts.services) {
      optsOauthEndpoint = opts.services.OAUTH || opts.services.API
    }
    const oauthEndpoint = constants.services.OAUTH || constants.services.API
    this.oauth_endpoint = `${optsOauthEndpoint || oauthEndpoint}`
    if (this.oauth_endpoint[this.oauth_endpoint.length - 1] === '/' && constants.OAUTH_AUTHORIZE_ENDPOINT[0] === '/') {
      this.oauth_endpoint = this.oauth_endpoint.substr(0, this.oauth_endpoint.length - 1)
    }
    this.oauth_endpoint += constants.OAUTH_AUTHORIZE_ENDPOINT
    this.oauth_query = `?client_id=${opts.client_id}&response_mode=${this.response_mode}` +
      `&response_type=token&scope=${this.scope}`
  }

  retrieveTokens () {
    throw new Error('You need to implement a retrieveTokens function inside your strategy')
  }

  deleteTokens () {
    throw new Error('You need to implement a deleteTokens function inside your strategy')
  }

  static implementations (name) {
    const flows = {
      'embed': {
        nodule: require('./embed_strategy'),
        condition: 'node'
      },
      'browser': {
        nodule: require('./browser_strategy'),
        condition: 'browser'
      },
      'standalone': {
        nodule: require('./standalone_strategy'),
        condition: null
      }
    }
    return name ? flows[name] : null
  }
}

module.exports = AuthStrategy

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]--