ft-s3o-go

module
v0.0.0-...-fb72012 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2018 License: MIT

README

ft-s3o-go

CircleCI

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: GoDoc

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

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL