File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,13 @@ class OidcUtils {
170170 return responseJson . access_token ;
171171 } ) ;
172172 }
173+ /**
174+ * Extracts the access token and username from the CLI output.
175+ * Attempts to parse the input as JSON first, then falls back to regex.
176+ * Currently, in the CLI 2.75.0 version, the output is not a valid JSON.
177+ * This will be fixed in the next versions, but for now we need to support both.
178+ * @param input
179+ */
173180 static getAccessTokenFromCliOutput ( input ) {
174181 if ( ! input ) {
175182 throw new Error ( 'Input is empty. Cannot extract values.' ) ;
Original file line number Diff line number Diff line change @@ -162,6 +162,13 @@ export class OidcUtils {
162162 return responseJson . access_token ;
163163 }
164164
165+ /**
166+ * Extracts the access token and username from the CLI output.
167+ * Attempts to parse the input as JSON first, then falls back to regex.
168+ * Currently, in the CLI 2.75.0 version, the output is not a valid JSON.
169+ * This will be fixed in the next versions, but for now we need to support both.
170+ * @param input
171+ */
165172 public static getAccessTokenFromCliOutput ( input : string ) : { accessToken : string ; username : string } {
166173 if ( ! input ) {
167174 throw new Error ( 'Input is empty. Cannot extract values.' ) ;
You can’t perform that action at this time.
0 commit comments