oauthGrantType(element, flow) {
    const { Member: MemberElement } = this.namespace.elements;
    let grantType = flow;

    if (flow === 'password') {
      grantType = 'resource owner password credentials';
    } else if (flow === 'application') {
      grantType = 'client credentials';
    } else if (flow === 'accessCode') {
      grantType = 'authorization code';
    }

    const member = new MemberElement('grantType', grantType);

    if (this.generateSourceMap) {
      this.createSourceMap(member, this.path.concat(['flow']));
    }

    element.content.push(member);
  }
// Convert Oauth2 flow into Refract elements
Convert Oauth2 flow into Refract elements
Convert Oauth2 flow into Refract elements
oauthGrantType(element, flow) {
    const { Member: MemberElement } = this.namespace.elements;
    let grantType = flow;
    if (flow === 'password') {
      grantType = 'resource owner password credentials';
    } else if (flow === 'application') {
      grantType = 'client credentials';
    } else if (flow === 'accessCode') {
      grantType = 'authorization code';
    }
    const member = new MemberElement('grantType', grantType);
    if (this.generateSourceMap) {
      this.createSourceMap(member, this.path.concat(['flow']));
    }
    element.content.push(member);
  }
oauthGrantType ( element , flow ) { const { Member : MemberElement } = this . namespace . elements ; let grantType = flow ; if ( flow === 'password' ) { grantType = 'resource owner password credentials' ; } else if ( flow === 'application' ) { grantType = 'client credentials' ; } else if ( flow === 'accessCode' ) { grantType = 'authorization code' ; } const member = new MemberElement ( 'grantType' , grantType ) ; if ( this . generateSourceMap ) { this . createSourceMap ( member , this . path . concat ( [ 'flow' ] ) ) ; } element . content . push ( member ) ; }
Convert Oauth2 flow into Refract elements
Convert Oauth2 flow into Refract elements