-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Controller Google Login * chore: Adding Google oAuth2 Package * feat: Adding Cors Middleware * feat: Cors Middleware * feat: WIP Google Login * chore: refactor Login and Access Token * feat: Google Login Finished * chore: Refactoring DB and ENV initialization * feat: Facebook Implementation + Better implementation. * feat: provider error * feat: Provider Tests * feat: Provider tests * fix: Fixing something wrong * foix: Google Struct name * fix: Compose api Port * Fix: Errors and variables names * fix: adding error check * Issue 36 (#150) * feat: add migration push notification settings * feat: push notification endpoint * fix: adjust user repo to update push notification * Padronizar testes usando Mockery (#147) (#152) *refactor tests: breed and pet. * foix: Google Struct name * fix: Compose api Port * Fix: Errors and variables names * fix: adding error check * feat: Controller Google Login * chore: Adding Google oAuth2 Package * feat: Adding Cors Middleware * feat: Cors Middleware * feat: WIP Google Login * chore: refactor Login and Access Token * feat: Google Login Finished * chore: Refactoring DB and ENV initialization * feat: Facebook Implementation + Better implementation. * feat: provider error * feat: Provider Tests * feat: Provider tests * Issue 36 (#150) * feat: add migration push notification settings * feat: push notification endpoint * fix: adjust user repo to update push notification * Padronizar testes usando Mockery (#147) (#152) *refactor tests: breed and pet. * foix: Google Struct name * fix: Compose api Port * Fix: Errors and variables names * fix: adding error check * fix: ajust docker compose * fix: resolve lint errors --------- Co-authored-by: Thiago Calazans <98334306+thiagoCalazans-dev@users.noreply.github.com> Co-authored-by: Edilton Oliveira <86030948+EdiltonOliveira@users.noreply.github.com> Co-authored-by: Paulo Victor T Silva <pilutechinformatica@gmail.com>
- Loading branch information
1 parent
63e713c
commit 69b94a3
Showing
26 changed files
with
821 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package middlewares | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/go-chi/cors" | ||
) | ||
|
||
func CorsMiddleware() func(http.Handler) http.Handler { | ||
return cors.Handler(cors.Options{ | ||
AllowedOrigins: []string{"*"}, | ||
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"}, | ||
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"}, | ||
ExposedHeaders: []string{"Link"}, | ||
AllowCredentials: true, | ||
MaxAge: 300, // Maximum value not ignored by any of major browsers | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package dto | ||
|
||
type UserSSODto struct { | ||
Name string `json:"name"` | ||
Email string `json:"email"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.