oauthTransitions(element, oauth) {
    const { Transition } = this.namespace.elements;

    if (oauth.authorizationUrl) {
      const transition = new Transition();

      transition.relation = 'authorize';
      transition.href = oauth.authorizationUrl;

      if (this.generateSourceMap) {
        this.createSourceMap(transition.attributes.get('href'), this.path.concat(['authorizationUrl']));
        this.createSourceMap(transition.attributes.get('relation'), this.path.concat(['authorizationUrl']));
      }

      element.content.push(transition);
    }

    if (oauth.tokenUrl) {
      const transition = new Transition();

      transition.relation = 'token';
      transition.href = oauth.tokenUrl;

      if (this.generateSourceMap) {
        this.createSourceMap(transition.attributes.get('href'), this.path.concat(['tokenUrl']));
        this.createSourceMap(transition.attributes.get('relation'), this.path.concat(['tokenUrl']));
      }

      element.content.push(transition);
    }
  }
// Conver OAuth2 transition information into Refract elements
Conver OAuth2 transition information into Refract elements
Conver OAuth2 transition information into Refract elements
oauthTransitions(element, oauth) {
    const { Transition } = this.namespace.elements;
    if (oauth.authorizationUrl) {
      const transition = new Transition();
      transition.relation = 'authorize';
      transition.href = oauth.authorizationUrl;
      if (this.generateSourceMap) {
        this.createSourceMap(transition.attributes.get('href'), this.path.concat(['authorizationUrl']));
        this.createSourceMap(transition.attributes.get('relation'), this.path.concat(['authorizationUrl']));
      }
      element.content.push(transition);
    }
    if (oauth.tokenUrl) {
      const transition = new Transition();
      transition.relation = 'token';
      transition.href = oauth.tokenUrl;
      if (this.generateSourceMap) {
        this.createSourceMap(transition.attributes.get('href'), this.path.concat(['tokenUrl']));
        this.createSourceMap(transition.attributes.get('relation'), this.path.concat(['tokenUrl']));
      }
      element.content.push(transition);
    }
  }
oauthTransitions ( element , oauth ) { const { Transition } = this . namespace . elements ; if ( oauth . authorizationUrl ) { const transition = new Transition ( ) ; transition . relation = 'authorize' ; transition . href = oauth . authorizationUrl ; if ( this . generateSourceMap ) { this . createSourceMap ( transition . attributes . get ( 'href' ) , this . path . concat ( [ 'authorizationUrl' ] ) ) ; this . createSourceMap ( transition . attributes . get ( 'relation' ) , this . path . concat ( [ 'authorizationUrl' ] ) ) ; } element . content . push ( transition ) ; } if ( oauth . tokenUrl ) { const transition = new Transition ( ) ; transition . relation = 'token' ; transition . href = oauth . tokenUrl ; if ( this . generateSourceMap ) { this . createSourceMap ( transition . attributes . get ( 'href' ) , this . path . concat ( [ 'tokenUrl' ] ) ) ; this . createSourceMap ( transition . attributes . get ( 'relation' ) , this . path . concat ( [ 'tokenUrl' ] ) ) ; } element . content . push ( transition ) ; } }
Conver OAuth2 transition information into Refract elements
Conver OAuth2 transition information into Refract elements