Skip to content

Add test class for Authenticate middleware#1115

Draft
dati18 wants to merge 3 commits intomainfrom
authenticate-middleware-test
Draft

Add test class for Authenticate middleware#1115
dati18 wants to merge 3 commits intomainfrom
authenticate-middleware-test

Conversation

@dati18
Copy link
Copy Markdown
Contributor

@dati18 dati18 commented Apr 30, 2026

The Authenticate.php did not have a test, so I wrote one for it.

I think we can also test authenticating using Passport token from Authorization Header

@dati18 dati18 marked this pull request as draft April 30, 2026 17:38
@dati18 dati18 force-pushed the authenticate-middleware-test branch from 7a3465a to ce11fce Compare May 6, 2026 12:21
@dati18 dati18 force-pushed the authenticate-middleware-test branch from ce11fce to e7e399b Compare May 6, 2026 12:49
->assertJson(['email' => $user->email]);
}

public function testAuthenticatesUsingPassportTokenFromAuthorizationHeader(): void {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice idea to ensure that our Middleware doesn't break any Authorization Header workflows

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I said it in the PR description but haven't done it till now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants