Skip to content

Middleware - #4

Open
hamid-JTG wants to merge 13 commits into
loginfrom
middleware
Open

Middleware#4
hamid-JTG wants to merge 13 commits into
loginfrom
middleware

Conversation

@hamid-JTG

Copy link
Copy Markdown
Owner

No description provided.

@hamid-JTG
hamid-JTG force-pushed the middleware branch 2 times, most recently from b1167f8 to f82b865 Compare March 4, 2025 12:33
@hamid-JTG
hamid-JTG force-pushed the middleware branch 2 times, most recently from ac264f8 to 200b019 Compare March 5, 2025 12:41
@hamid-JTG
hamid-JTG force-pushed the middleware branch 2 times, most recently from b1810ab to a66ccf3 Compare March 6, 2025 10:59
@hamid-JTG
hamid-JTG force-pushed the login branch 2 times, most recently from fa9e66f to ed52549 Compare March 6, 2025 12:21
Comment thread middleware/auth.go Outdated
Comment on lines +22 to +23
if len(authHeader) > 7 && authHeader[:7] == "Bearer " {
tokenString = authHeader[7:]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

there is a better way to split the string from space and take second element of array

Comment thread middleware/auth.go Outdated

func AuthMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
authHeader := c.GetHeader("Authorization")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

create a constant

@hamid-JTG
hamid-JTG force-pushed the middleware branch 2 times, most recently from 12f4fd9 to e5ee997 Compare March 7, 2025 09:17
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.

2 participants