mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-18 01:03:01 -06:00
bit more progress
This commit is contained in:
parent
40917c2cd9
commit
8e0d32d3e1
9 changed files with 241 additions and 80 deletions
|
|
@ -38,7 +38,10 @@ const (
|
|||
// OauthAuthorizePath is the API path for authorization requests (eg., authorize this app to act on my behalf as a user)
|
||||
OauthAuthorizePath = "/oauth/authorize"
|
||||
// CallbackPath is the API path for receiving callback tokens from external OIDC providers
|
||||
CallbackPath = "/auth/callback"
|
||||
CallbackPath = oidc.CallbackPath
|
||||
|
||||
callbackStateParam = "state"
|
||||
callbackCodeParam = "code"
|
||||
|
||||
sessionUserID = "userid"
|
||||
sessionClientID = "client_id"
|
||||
|
|
@ -89,6 +92,8 @@ func (m *Module) Route(s router.Router) error {
|
|||
s.AttachHandler(http.MethodGet, OauthAuthorizePath, m.AuthorizeGETHandler)
|
||||
s.AttachHandler(http.MethodPost, OauthAuthorizePath, m.AuthorizePOSTHandler)
|
||||
|
||||
s.AttachHandler(http.MethodGet, CallbackPath, m.CallbackGETHandler)
|
||||
|
||||
s.AttachMiddleware(m.OauthTokenMiddleware)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue