module
Version:
v0.0.0-...-fb72012
Opens a new window with list of versions in this module.
Published: May 8, 2018
License: MIT
Opens a new window with license information.
README
¶
ft-s3o-go
Go middleware to handle authenticating with S3O
- If the user is not authenticated, the library redirects to S3O for authentication.
username
and token
cookies will be stored after a successful auth.
For documentation, click this link:
Example Usage
package main
import (
"log"
"net/http"
"github.com/Financial-Times/ft-s3o-go/s3o"
)
func main() {
// create a "hello world" hander
var handler http.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("hello secure world\n")) })
// secure it with s3o
handler = s3o.Handler(handler)
// start our server
log.Fatal(http.ListenAndServe(":8080", handler))
}
Directories
¶
Click to show internal directories.
Click to hide internal directories.