Create sign-in and sign-out workflow in SPA
This commit is contained in:
parent
08a1b5b81d
commit
b6d1bd9ee2
15 changed files with 761 additions and 460 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/auth"
|
||||
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/platform"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
@ -36,3 +37,7 @@ func postSignin(ctx context.Context, r *http.Request, req reqSignin) (string, *n
|
|||
}
|
||||
return "/", nil
|
||||
}
|
||||
func postSignout(ctx context.Context, w http.ResponseWriter, r *http.Request, u platform.User) *nhttp.ErrorWithStatus {
|
||||
auth.SignoutUser(r, u)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue