Rename open session for saml
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -410,7 +410,7 @@ func (s AuthService) CreateIdentityWithPassword(
|
||||
return user, session, err
|
||||
}
|
||||
|
||||
func (s AuthService) OpenSessionWithoutPassword(ctx context.Context, userID gid.GID, organizationID gid.GID) (*coredata.Session, error) {
|
||||
func (s AuthService) OpenSessionWithSAML(ctx context.Context, userID gid.GID, organizationID gid.GID) (*coredata.Session, error) {
|
||||
session := &coredata.Session{}
|
||||
|
||||
err := s.pg.WithTx(
|
||||
|
||||
@@ -60,7 +60,7 @@ func (h *SAMLHandler) ConsumeHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
session := SessionFromContext(ctx)
|
||||
if session == nil {
|
||||
h.iam.AuthService.OpenSessionWithoutPassword(ctx, user.ID, membership.OrganizationID)
|
||||
h.iam.AuthService.OpenSessionWithSAML(ctx, user.ID, membership.OrganizationID)
|
||||
}
|
||||
|
||||
// TODO open or update the organization session
|
||||
|
||||
Reference in New Issue
Block a user