Documentation
¶
Index ¶
- Variables
- type SAMLSession
- type SAMLSessionEntry
- type SAMLUIInfo
- type StoreRedis
- type UIService
- func (s *UIService) BuildAuthenticationURL(session *SAMLSession) (*url.URL, error)
- func (r *UIService) GetSAMLSessionID(req *http.Request, urlQuery string) (string, bool)
- func (r *UIService) RemoveSAMLSessionID(w http.ResponseWriter, req *http.Request)
- func (r *UIService) ResolveUIInfo(sp *config.SAMLServiceProviderConfig, entry *SAMLSessionEntry) (info *SAMLUIInfo, showUI bool, err error)
- type UIServiceAuthUIEndpointsProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( wire.Struct(new(StoreRedis), "*"), wire.Struct(new(UIService), "*"), )
View Source
var ErrNotFound = errors.New("saml session entry not found")
Functions ¶
This section is empty.
Types ¶
type SAMLSession ¶
type SAMLSession struct { ID string `json:"id,omitempty"` Entry *SAMLSessionEntry `json:"entry,omitempty"` UIInfo *SAMLUIInfo `json:"ui_info,omitempty"` }
func NewSAMLSession ¶
func NewSAMLSession(entry *SAMLSessionEntry, uiInfo *SAMLUIInfo) *SAMLSession
type SAMLSessionEntry ¶
type SAMLSessionEntry struct { ServiceProviderID string `json:"service_provider_id,omitempty"` AuthnRequestXML string `json:"authn_request_xml,omitempty"` // The url the response should send to CallbackURL string `json:"callback_url,omitempty"` RelayState string `json:"relay_state,omitempty"` }
func (*SAMLSessionEntry) AuthnRequest ¶
func (s *SAMLSessionEntry) AuthnRequest() (*samlprotocol.AuthnRequest, bool)
type SAMLUIInfo ¶
type SAMLUIInfo struct { // SAMLServiceProviderID is id of the service provider, and also the corresponding client_id SAMLServiceProviderID string // RedirectURI is the redirect_uri the UI should redirect to. // The redirect_uri in the URL has lower precedence. // The rationale for this is if the end-user bookmarked the // authorization URL in the browser, redirect to the app is // possible. RedirectURI string // Prompt is the resolved oidc prompt from ForceAuthn and IsPassive for AuthnRequest. Prompt []string // login_hint resolved from <Subject> LoginHint string }
func (*SAMLUIInfo) ToUIParam ¶
func (i *SAMLUIInfo) ToUIParam() uiparam.T
type StoreRedis ¶
func (*StoreRedis) Delete ¶
func (s *StoreRedis) Delete(ctx context.Context, sessionID string) (err error)
func (*StoreRedis) Get ¶
func (s *StoreRedis) Get(ctx context.Context, sessionID string) (entry *SAMLSession, err error)
func (*StoreRedis) Save ¶
func (s *StoreRedis) Save(ctx context.Context, session *SAMLSession) (err error)
type UIService ¶
type UIService struct {
Endpoints UIServiceAuthUIEndpointsProvider
}
func (*UIService) BuildAuthenticationURL ¶
func (s *UIService) BuildAuthenticationURL(session *SAMLSession) (*url.URL, error)
func (*UIService) GetSAMLSessionID ¶
func (*UIService) RemoveSAMLSessionID ¶
func (r *UIService) RemoveSAMLSessionID(w http.ResponseWriter, req *http.Request)
func (*UIService) ResolveUIInfo ¶
func (r *UIService) ResolveUIInfo(sp *config.SAMLServiceProviderConfig, entry *SAMLSessionEntry) ( info *SAMLUIInfo, showUI bool, err error)
Click to show internal directories.
Click to hide internal directories.