saml

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequestIdNotFound = &tsuruErrors.ValidationError{Message: "Field attribute InResponseTo not found in saml response data"}
	ErrCheckSignature    = &tsuruErrors.ValidationError{Message: "SAMLResponse signature validation"}
)
View Source
var (
	ErrRequestNotFound = &errors.ValidationError{Message: "request not found or expired"}
)

Functions

func Metadata

func Metadata() (string, error)

Types

type AuthnRequestData

type AuthnRequestData struct {
	Base64AuthRequest string
	URL               string
	ID                string
}

type BaseConfig

type BaseConfig struct {
	EntityID              string
	DisplayName           string
	Description           string
	PublicCert            string
	PrivateKey            string
	IdpURL                string
	IdpPublicCert         string
	SignRequest           bool
	SignedResponse        bool
	DeflatEncodedResponse bool
}

type SAMLAuthParser

type SAMLAuthParser interface {
	Parse(infoResponse string) (*saml.Response, error)
}

type SAMLAuthScheme

type SAMLAuthScheme struct {
	BaseConfig BaseConfig
	Parser     SAMLAuthParser
}

func (*SAMLAuthScheme) AppLogin

func (s *SAMLAuthScheme) AppLogin(appName string) (auth.Token, error)

func (SAMLAuthScheme) AppLogout

func (s SAMLAuthScheme) AppLogout(token string) error

func (*SAMLAuthScheme) Auth

func (s *SAMLAuthScheme) Auth(token string) (auth.Token, error)

func (*SAMLAuthScheme) Create

func (s *SAMLAuthScheme) Create(user *auth.User) (*auth.User, error)

func (*SAMLAuthScheme) Info

func (s *SAMLAuthScheme) Info() (auth.SchemeInfo, error)

func (*SAMLAuthScheme) Login

func (s *SAMLAuthScheme) Login(params map[string]string) (auth.Token, error)

func (*SAMLAuthScheme) Logout

func (s *SAMLAuthScheme) Logout(token string) error

func (*SAMLAuthScheme) Name

func (s *SAMLAuthScheme) Name() string

func (*SAMLAuthScheme) Parse

func (s *SAMLAuthScheme) Parse(xml string) (*saml.Response, error)

func (*SAMLAuthScheme) Remove

func (s *SAMLAuthScheme) Remove(u *auth.User) error

type Token

type Token struct {
	Token     string        `json:"token"`
	Creation  time.Time     `json:"creation"`
	Expires   time.Duration `json:"expires"`
	UserEmail string        `json:"email"`
	AppName   string        `json:"app"`
}

func (*Token) GetAppName

func (t *Token) GetAppName() string

func (*Token) GetUserName

func (t *Token) GetUserName() string

func (*Token) GetValue

func (t *Token) GetValue() string

func (*Token) IsAppToken

func (t *Token) IsAppToken() bool

func (*Token) Permissions

func (t *Token) Permissions() ([]permission.Permission, error)

func (*Token) User

func (t *Token) User() (*authTypes.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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