auth

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Overview

Package auth xmlsec.go is taken from: https://github.com/RobotsAndPencils/go-saml/blob/master/xmlsec.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHandlers

func AddHandlers(s *server.Server)

AddHandlers adds auth handlers to the server

func Cleanup

func Cleanup()

Cleanup cleans up the auth service

func InitNullAuthService added in v1.1.0

func InitNullAuthService() error

InitNullAuthService sets the auth service to null

func InitOktaAuthService

func InitOktaAuthService(config *OktaConfig) error

InitOktaAuthService creates a new instance of OktaAuthService from the given config and sets it as the default auth service

Types

type Null added in v1.1.0

type Null struct{}

Null implements a the auth Service interface and always auths

func (*Null) AddHandlers added in v1.1.0

func (s *Null) AddHandlers(srv *server.Server)

AddHandlers implements the Service interface

func (*Null) Cleanup added in v1.1.0

func (s *Null) Cleanup()

Cleanup is a noop with the null handler

type OktaAuthService

type OktaAuthService struct {
	// contains filtered or unexported fields
}

OktaAuthService is the auth service that uses Okta to authenticate users

func (*OktaAuthService) AddHandlers

func (s *OktaAuthService) AddHandlers(srv *server.Server)

AddHandlers implements the Service interface

func (*OktaAuthService) Cleanup

func (s *OktaAuthService) Cleanup()

Cleanup implements the Service interface

func (*OktaAuthService) Validate

func (s *OktaAuthService) Validate(r *saml.Response, originalBytes []byte) error

Validate validates the SAML response taken from https://github.com/RobotsAndPencils/go-saml/blob/master/authnresponse.go#L49

type OktaConfig

type OktaConfig struct {
	Entrypoint string
	Issuer     string
	Cert       string
	Domain     string
}

OktaConfig is the configuration for the OktaAuthService

type Service

type Service interface {
	AddHandlers(s *server.Server)
	Cleanup()
}

Service is an authentication service interface

Jump to

Keyboard shortcuts

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