You are here

public function TestContent::test11 in JSON Web Token Authentication (JWT) 8

Provides example content for route specific authentication.

@returns array The user name of the current logged in user in a render array.

1 string reference to 'TestContent::test11'
jwt_test.routing.yml in tests/modules/jwt_test/jwt_test.routing.yml
tests/modules/jwt_test/jwt_test.routing.yml

File

tests/modules/jwt_test/src/Controller/TestContent.php, line 25

Class

TestContent
Test content.

Namespace

Drupal\jwt_test\Controller

Code

public function test11() {
  $account = $this
    ->currentUser();
  return [
    '#markup' => $account
      ->getAccountName(),
  ];
}