summaryrefslogtreecommitdiffstats
path: root/einterfaces/saml.go
blob: df9207d6730b041b0a6f5f3da6da3355cefd4b48 (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-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package einterfaces

import (
	"github.com/mattermost/mattermost-server/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
}