Skip to content

Commit 6104297

Browse files
committed
Show authenticated team information
1 parent 9b4b675 commit 6104297

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

app/Commands/Account/Auth/WhoamiCommand.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,26 @@ public function handle(AuthService $auth): int
3434
$team = Arr::first($userInfo['teams']);
3535

3636
$this->boldLine('chief.app');
37+
$this->line(' <fg=green>✓</> Authenticated with <options=bold>chief.app</>');
38+
$this->newLine();
39+
40+
$this->boldLine('Account information:');
3741
$this->line(sprintf(
38-
' <fg=green>✓</> Logged in to chief.app account <options=bold>%s</> (<options=bold>%s</>)',
42+
' User: <options=bold>%s</> (<options=bold>%s</>)',
3943
$userInfo['name'],
4044
$userInfo['email'],
4145
));
4246
$this->line(sprintf(
43-
' Token type: %s',
47+
' Team: <options=bold>%s</> (<options=bold>%s</>)',
48+
$team['name'],
49+
$team['slug'],
50+
));
51+
52+
$this->newLine();
53+
54+
$this->boldLine('Token information:');
55+
$this->line(sprintf(
56+
' Type: %s',
4457
match ($parsedToken->prefix) {
4558
'cto' => 'OAuth',
4659
'ctp' => 'Personal access token',
@@ -53,7 +66,7 @@ public function handle(AuthService $auth): int
5366
str_repeat('*', strlen($parsedToken->random . $parsedToken->checksum)),
5467
));
5568
$this->line(sprintf(
56-
' Token scopes: <options=bold>%s</>',
69+
' Scopes: <options=bold>%s</>',
5770
implode(', ', explode(' ', $tokenInfo['scope'])),
5871
));
5972

0 commit comments

Comments
 (0)