cshenfu
2023-06-14 de93aa62c83d6afb9f70cd5a22838375db0a8cbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const AlipayBase = require('../alipayBase')
const protocols = require('./protocols')
module.exports = class Auth extends AlipayBase {
  constructor (options) {
    super(options)
    this._protocols = protocols
  }
 
  async code2Session (code) {
    const result = await this._exec('alipay.system.oauth.token', {
      grantType: 'authorization_code',
      code
    })
    return result
  }
}