src/server.js
/**
   * Perform validation of a token based on the remote server's introspection endpoint. 
   * @param {*} token 
   */
Perform validation of a token based on the remote server's introspection endpoint.
@param {*} token
Perform validation of a token based on the remote server ' s introspection endpoint . @param { * } token
async serverValidate(token){
    const config = {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    }
    let response = await axios.post(this.serverConfiguration.intorspection_endpoint, qs.stringify({token: token}), config)
    let result = response.data
    if(result.active){
      return result
    }
    return null 
  }
async serverValidate ( token ) { const config = { headers : { 'Content-Type' : 'application/x-www-form-urlencoded' } } let response = await axios . post ( this . serverConfiguration . intorspection_endpoint , qs . stringify ( { token : token } ) , config ) let result = response . data if ( result . active ) { return result } return null }
Perform validation of a token based on the remote server's introspection endpoint.
Perform validation of a token based on the remote server ' s introspection endpoint .