vue请求spring-security-oauth2,oauth/token方法

    this.$axios({
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      method: 'get',
      url: 'http://192.168.196.1:8081/platform-auth/oauth/token?grant_type=password&username=chenjian&password=123456&verifyCode=QTM5&uuid=1430040093883645952',
      auth: {
        username: '1405784343799996416',
        password: '1405784403384279040'
      }
    }).then(response => {
      console.log(response.data.access_token)
      console.log(response.data.token_type)
      console.log(response.data.refresh_token)
    }).catch(err => {
      console.log(err)
      reject(err)
    })

猜你喜欢

转载自blog.csdn.net/u013008898/article/details/120805535