summaryrefslogtreecommitdiffstats
path: root/einterfaces/saml.go
blob: af2e815a54ee3ca1c5a8fe95ab2ef937c9cde938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package einterfaces

import (
	"github.com/mattermost/platform/model"
)

type SamlInterface interface {
	ConfigureSP() *model.AppError
	BuildRequest(relayState string) (*model.SamlAuthRequest, *model.AppError)
	DoLogin(encodedXML string, relayState map[string]string) (*model.User, *model.AppError)
	GetMetadata() (string, *model.AppError)
}

var theSamlInterface SamlInterface

func RegisterSamlInterface(newInterface SamlInterface) {
	theSamlInterface = newInterface
}

func GetSamlInterface() SamlInterface {
	return theSamlInterface
}