File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,13 @@ export class Codefresh {
5252
5353 async validateCredentials ( cfCreds : CodefreshCredentials ) {
5454 logger . info ( 'Validating Codefresh credentials...' ) ;
55- const tokenID = cfCreds . headers [ 'Authorization' ] . split ( '.' ) [ 0 ] ;
56- const response = await fetch ( `${ cfCreds . baseUrl } /auth/key/${ tokenID } ` , {
55+ const response = await fetch ( `${ cfCreds . baseUrl } /runtime-environments` , {
5756 method : 'GET' ,
5857 headers : cfCreds . headers ,
5958 } ) ;
6059
6160 if ( ! response . ok ) {
62- logger . error ( `Invalid Codefresh credentials. Status: ${ response . status } ` ) ;
61+ logger . error ( `Invalid Codefresh credentials. Status: ${ JSON . stringify ( await response . json ( ) ) } ` ) ;
6362 return false ;
6463 }
6564 logger . info ( 'Codefresh credentials are valid.' ) ;
You can’t perform that action at this time.
0 commit comments