@@ 144-148 (lines=5) @@ | ||
141 | $auth = $io->getAuthentication($authKey); |
|
142 | ||
143 | // is github |
|
144 | if (in_array($authKey, $githubDomains) && 'x-oauth-basic' === $auth['password']) { |
|
145 | $this->addHeader('authorization', 'token ' . $auth['username']); |
|
146 | $this->user = $this->pass = null; |
|
147 | return; |
|
148 | } |
|
149 | // is gitlab |
|
150 | if (in_array($authKey, $gitlabDomains)) { |
|
151 | if ('oauth2' === $auth['password']) { |
|
@@ 151-155 (lines=5) @@ | ||
148 | } |
|
149 | // is gitlab |
|
150 | if (in_array($authKey, $gitlabDomains)) { |
|
151 | if ('oauth2' === $auth['password']) { |
|
152 | $this->addHeader('authorization', 'Bearer ' . $auth['username']); |
|
153 | $this->user = $this->pass = null; |
|
154 | return; |
|
155 | } |
|
156 | if ('private-token' === $auth['password']) { |
|
157 | $this->addHeader('PRIVATE-TOKEN', $auth['username']); |
|
158 | $this->user = $this->pass = null; |
|
@@ 156-160 (lines=5) @@ | ||
153 | $this->user = $this->pass = null; |
|
154 | return; |
|
155 | } |
|
156 | if ('private-token' === $auth['password']) { |
|
157 | $this->addHeader('PRIVATE-TOKEN', $auth['username']); |
|
158 | $this->user = $this->pass = null; |
|
159 | return; |
|
160 | } |
|
161 | } |
|
162 | ||
163 | // others, includes bitbucket |