Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions api/iam/v1alpha1/iam_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -2577,6 +2577,20 @@ type OrganizationSecuritySettings struct {
MaxLoginSessionDuration *scw.Duration `json:"max_login_session_duration"`
}

// ParseSamlMetadataRequest: parse saml metadata request.
type ParseSamlMetadataRequest struct {
File scw.File `json:"file"`
}

// ParseSamlMetadataResponse: parse saml metadata response.
type ParseSamlMetadataResponse struct {
SingleSignOnURL string `json:"single_sign_on_url"`

EntityID string `json:"entity_id"`

SigningCertificates []string `json:"signing_certificates"`
}

// RemoveGroupMemberRequest: remove group member request.
type RemoveGroupMemberRequest struct {
// GroupID: ID of the group.
Expand Down Expand Up @@ -4691,6 +4705,29 @@ func (s *API) DeleteSaml(req *DeleteSamlRequest, opts ...scw.RequestOption) erro
return nil
}

// ParseSamlMetadata: Parse SAML xml metadata file.
func (s *API) ParseSamlMetadata(req *ParseSamlMetadataRequest, opts ...scw.RequestOption) (*ParseSamlMetadataResponse, error) {
var err error

scwReq := &scw.ScalewayRequest{
Method: "POST",
Path: "/iam/v1alpha1/parse-saml-metadata",
}

err = scwReq.SetBody(req)
if err != nil {
return nil, err
}

var resp ParseSamlMetadataResponse

err = s.client.Do(scwReq, &resp, opts...)
if err != nil {
return nil, err
}
return &resp, nil
}

// ListSamlCertificates: List SAML certificates.
func (s *API) ListSamlCertificates(req *ListSamlCertificatesRequest, opts ...scw.RequestOption) (*ListSamlCertificatesResponse, error) {
var err error
Expand Down