Skip to content
Snippets Groups Projects
Commit 28d98e67 authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

Format

parent f62f4ab5
Branches
No related tags found
No related merge requests found
...@@ -83,7 +83,10 @@ func (c *Client) GetAuthURL(opts ...oauth2.AuthCodeOption) string { ...@@ -83,7 +83,10 @@ func (c *Client) GetAuthURL(opts ...oauth2.AuthCodeOption) string {
// A next paraméter megkapja a user adatait a details változóban, illetve egy http.ResponseWriter-t és *http.Request-et is, // A next paraméter megkapja a user adatait a details változóban, illetve egy http.ResponseWriter-t és *http.Request-et is,
// így az a függvény célszerűen eltárolja a user adatait, beállít egy sütit, majd átirányítja. // így az a függvény célszerűen eltárolja a user adatait, beállít egy sütit, majd átirányítja.
// Az errorCallback paraméterben megadott függvény pedig hibás belépés esetén fut le, ott célszerű egy hibaoldalt megjeleníteni. // Az errorCallback paraméterben megadott függvény pedig hibás belépés esetén fut le, ott célszerű egy hibaoldalt megjeleníteni.
func (c *Client) GetLoginHandler(next func(details *AccDetails, w http.ResponseWriter, r *http.Request), errorCallback func(w http.ResponseWriter, r *http.Request)) http.Handler { func (c *Client) GetLoginHandler(
next func(details *AccDetails, w http.ResponseWriter, r *http.Request),
errorCallback func(w http.ResponseWriter, r *http.Request),
) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := context.Background() ctx := context.Background()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment