Files
signoz/pkg/authn/authn.go
Karan Balani e8ce7b22f5 feat: idp initiated saml authn (#9716)
Support IDP initiated SAML authentication.
2025-11-28 19:29:44 +00:00

29 lines
870 B
Go

package authn
import (
"context"
"net/url"
"github.com/SigNoz/signoz/pkg/types/authtypes"
"github.com/SigNoz/signoz/pkg/valuer"
)
// This can either be a password authn or a callback authn.
type AuthN interface{}
type PasswordAuthN interface {
// Authenticate a user using email, password and orgID
Authenticate(context.Context, string, string, valuer.UUID) (*authtypes.Identity, error)
}
type CallbackAuthN interface {
// The initial URL to redirect the user to. Takes the site url and org domain to be used in the callback.
LoginURL(context.Context, *url.URL, *authtypes.AuthDomain) (string, error)
// Handle the callback from the provider.
HandleCallback(context.Context, url.Values) (*authtypes.CallbackIdentity, error)
// Get provider info such as `relay state`
ProviderInfo(context.Context, *authtypes.AuthDomain) *authtypes.AuthNProviderInfo
}