@@ -449,7 +449,7 @@ func (s AuthService) CreateIdentityWithPassword(
|
|||||||
return identity, session, err
|
return identity, session, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s AuthService) OpenSessionWithSAML(ctx context.Context, identityID gid.GID, organizationID gid.GID) (*coredata.Session, error) {
|
func (s AuthService) OpenSessionWithSAML(ctx context.Context, identityID gid.GID) (*coredata.Session, error) {
|
||||||
session := &coredata.Session{}
|
session := &coredata.Session{}
|
||||||
|
|
||||||
err := s.pg.WithTx(
|
err := s.pg.WithTx(
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ func (h *SAMLHandler) ConsumeHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
switch {
|
switch {
|
||||||
case rootSession == nil:
|
case rootSession == nil:
|
||||||
rootSession, err = h.iam.AuthService.OpenSessionWithSAML(ctx, user.ID, membership.OrganizationID)
|
rootSession, err = h.iam.AuthService.OpenSessionWithSAML(ctx, user.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
h.logger.ErrorCtx(ctx, "cannot open root session", log.Error(err))
|
h.logger.ErrorCtx(ctx, "cannot open root session", log.Error(err))
|
||||||
h.renderInternalServerError(w, r)
|
h.renderInternalServerError(w, r)
|
||||||
@@ -88,7 +88,7 @@ func (h *SAMLHandler) ConsumeHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rootSession, err = h.iam.AuthService.OpenSessionWithSAML(ctx, user.ID, membership.OrganizationID)
|
rootSession, err = h.iam.AuthService.OpenSessionWithSAML(ctx, user.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
h.logger.ErrorCtx(ctx, "cannot open root session", log.Error(err))
|
h.logger.ErrorCtx(ctx, "cannot open root session", log.Error(err))
|
||||||
h.renderInternalServerError(w, r)
|
h.renderInternalServerError(w, r)
|
||||||
|
|||||||
Reference in New Issue
Block a user