shibboleth

package
v0.4.33 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name      = "shibboleth"
	Config    = Name + "config"
	TokenType = Name + "jwt"
	UserType  = Name + "_user"
	GroupType = Name + "_group"
)

Constants for shibboleth

Variables

This section is empty.

Functions

func GetUserIdentity

func GetUserIdentity(identities []client.Identity, userType string) (client.Identity, bool)

GetUserIdentity returns the "user" from the list of identities

Types

type Account

type Account struct {
	UID         string `json:"uid,omitempty"`         //objectId
	DisplayName string `json:"displayname,omitempty"` //name
	UserName    string `json:"username,omitempty"`    //samAccountName (login name)
	IsGroup     bool
}

Account defines properties an account details shibboleth IDP provides. Account can also be created for a group entity.

type SPClient

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

SPClient implements a client for shibboleth and the saml library

type SProvider

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

SProvider implements an IdentityProvider for shibboleth

func InitializeProvider

func InitializeProvider() (*SProvider, error)

InitializeProvider returns a new instance of the provider

func (*SProvider) AddProviderConfig

func (s *SProvider) AddProviderConfig(authConfig *model.AuthConfig, providerSettings map[string]string)

AddProviderConfig adds the provider config into the generic config using the settings from db

func (*SProvider) CustomizeSchema added in v0.4.3

func (s *SProvider) CustomizeSchema(schema *v1client.Schema) *v1client.Schema

func (*SProvider) GenerateToken

func (s *SProvider) GenerateToken(jsonInput map[string]string) (model.Token, int, error)

GenerateToken generates a token from the input json data

func (*SProvider) GetConfig

func (s *SProvider) GetConfig() model.AuthConfig

GetConfig returns the provider config

func (*SProvider) GetIdentities

func (s *SProvider) GetIdentities(accessToken string) ([]client.Identity, error)

GetIdentities returns list of user and group identities associated to this token

func (*SProvider) GetIdentity

func (s *SProvider) GetIdentity(externalID string, externalIDType string, accessToken string) (client.Identity, error)

GetIdentity returns the identity by externalID and externalIDType

func (*SProvider) GetIdentitySeparator

func (s *SProvider) GetIdentitySeparator() string

GetIdentitySeparator returns the provider specific separator to use to separate allowedIdentities

func (*SProvider) GetLegacySettings

func (s *SProvider) GetLegacySettings() map[string]string

GetLegacySettings returns the provider specific legacy db settings

func (*SProvider) GetName

func (s *SProvider) GetName() string

GetName returns the name of the provider

func (*SProvider) GetProviderConfigResource added in v0.4.3

func (s *SProvider) GetProviderConfigResource() interface{}

func (*SProvider) GetProviderSecretSettings added in v0.4.10

func (s *SProvider) GetProviderSecretSettings() []string

func (*SProvider) GetProviderSettingList

func (s *SProvider) GetProviderSettingList(listOnly bool) []string

GetProviderSettingList returns the provider specific db setting list

func (*SProvider) GetRedirectURL

func (s *SProvider) GetRedirectURL() string

GetRedirectURL returns the provider specific redirect URL used by UI

func (*SProvider) GetSettings

func (s *SProvider) GetSettings() map[string]string

GetSettings transforms the provider config to db settings

func (*SProvider) GetUserType

func (s *SProvider) GetUserType() string

GetUserType returns the string used to identify a user account for this provider

func (*SProvider) IsIdentityLookupSupported added in v0.4.10

func (s *SProvider) IsIdentityLookupSupported() bool

func (*SProvider) LoadConfig

func (s *SProvider) LoadConfig(authConfig *model.AuthConfig) error

LoadConfig initializes the provider with the passed config

func (*SProvider) RefreshToken

func (s *SProvider) RefreshToken(json map[string]string) (model.Token, int, error)

RefreshToken re-authenticates and generate a new token

func (*SProvider) SearchIdentities

func (s *SProvider) SearchIdentities(name string, exactMatch bool, accessToken string) ([]client.Identity, error)

SearchIdentities just returns an identity object by setting the name

func (*SProvider) TestLogin added in v0.4.3

func (s *SProvider) TestLogin(testAuthConfig *model.TestAuthConfig, accessToken string, originalLogin string) (int, error)

Jump to

Keyboard shortcuts

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