Fix basic auth plugin example.
NewBasicAuthenticator requires passing a second argument for Realm.
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -8,7 +8,7 @@ package auth | ... | @@ -8,7 +8,7 @@ package auth |
| 8 | // } | 8 | // } |
| 9 | // return false | 9 | // return false |
| 10 | // } | 10 | // } |
| 11 | // authPlugin := auth.NewBasicAuthenticator(SecretAuth) | 11 | // authPlugin := auth.NewBasicAuthenticator(SecretAuth, "My Realm") |
| 12 | // beego.AddFilter("*","AfterStatic",authPlugin) | 12 | // beego.AddFilter("*","AfterStatic",authPlugin) |
| 13 | 13 | ||
| 14 | import ( | 14 | import ( | ... | ... |
-
Please register or sign in to post a comment