Skip to content

Commit aa17cd7

Browse files
Merge pull request #173 from okta/upgrade-openapi-spec-2.1.0
Upgradet to okta openapi spec tp 2.1.1
2 parents fe09919 + 90e60d4 commit aa17cd7

30 files changed

Lines changed: 622 additions & 420 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/vendor
22
.okta
33
.idea
4+
.okta.yaml

okta/acsEndpoint.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2018 - Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
18+
19+
package okta
20+
21+
import ()
22+
23+
type AcsEndpoint struct {
24+
Index int64 `json:"index,omitempty"`
25+
Url string `json:"url,omitempty"`
26+
}

okta/catalogApplication.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2018 - Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
18+
19+
package okta
20+
21+
import (
22+
"time"
23+
)
24+
25+
type CatalogApplication struct {
26+
Links interface{} `json:"_links,omitempty"`
27+
Category string `json:"category,omitempty"`
28+
Description string `json:"description,omitempty"`
29+
DisplayName string `json:"displayName,omitempty"`
30+
Features []string `json:"features,omitempty"`
31+
Id string `json:"id,omitempty"`
32+
LastUpdated *time.Time `json:"lastUpdated,omitempty"`
33+
Name string `json:"name,omitempty"`
34+
SignOnModes []string `json:"signOnModes,omitempty"`
35+
Status string `json:"status,omitempty"`
36+
VerificationStatus string `json:"verificationStatus,omitempty"`
37+
Website string `json:"website,omitempty"`
38+
}

okta/catalogApplicationStatus.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2018 - Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
18+
19+
package okta
20+
21+
import ()
22+
23+
type CatalogApplicationStatus string

okta/customHotpUserFactor.go

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2018 - Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
18+
19+
package okta
20+
21+
import (
22+
"time"
23+
)
24+
25+
type CustomHotpUserFactor struct {
26+
Embedded interface{} `json:"_embedded,omitempty"`
27+
Links interface{} `json:"_links,omitempty"`
28+
Created *time.Time `json:"created,omitempty"`
29+
FactorType string `json:"factorType,omitempty"`
30+
Id string `json:"id,omitempty"`
31+
LastUpdated *time.Time `json:"lastUpdated,omitempty"`
32+
Provider string `json:"provider,omitempty"`
33+
Status string `json:"status,omitempty"`
34+
Verify *VerifyFactorRequest `json:"verify,omitempty"`
35+
FactorProfileId string `json:"factorProfileId,omitempty"`
36+
Profile *CustomHotpUserFactorProfile `json:"profile,omitempty"`
37+
}
38+
39+
func NewCustomHotpUserFactor() *CustomHotpUserFactor {
40+
return &CustomHotpUserFactor{
41+
FactorType: "hotp",
42+
}
43+
}
44+
45+
func (a *CustomHotpUserFactor) IsUserFactorInstance() bool {
46+
return true
47+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2018 - Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
18+
19+
package okta
20+
21+
import ()
22+
23+
type CustomHotpUserFactorProfile struct {
24+
SharedSecret string `json:"sharedSecret,omitempty"`
25+
}
26+
27+
func NewCustomHotpUserFactorProfile() *CustomHotpUserFactorProfile {
28+
return &CustomHotpUserFactorProfile{}
29+
}
30+
31+
func (a *CustomHotpUserFactorProfile) IsUserFactorInstance() bool {
32+
return true
33+
}

okta/group.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ func (m *GroupResource) GetRole(ctx context.Context, groupId string, roleId stri
374374
}
375375

376376
// Lists all App targets for an `APP_ADMIN` Role assigned to a Group. This methods return list may include full Applications or Instances. The response for an instance will have an `ID` value, while Application will not have an ID.
377-
func (m *GroupResource) ListApplicationTargetsForApplicationAdministratorRoleForGroup(ctx context.Context, groupId string, roleId string, qp *query.Params) ([]App, *Response, error) {
377+
func (m *GroupResource) ListApplicationTargetsForApplicationAdministratorRoleForGroup(ctx context.Context, groupId string, roleId string, qp *query.Params) ([]*CatalogApplication, *Response, error) {
378378
url := fmt.Sprintf("/api/v1/groups/%v/roles/%v/targets/catalog/apps", groupId, roleId)
379379
if qp != nil {
380380
url = url + qp.String()
@@ -385,19 +385,14 @@ func (m *GroupResource) ListApplicationTargetsForApplicationAdministratorRoleFor
385385
return nil, nil, err
386386
}
387387

388-
var application []Application
388+
var catalogApplication []*CatalogApplication
389389

390-
resp, err := m.client.requestExecutor.Do(ctx, req, &application)
390+
resp, err := m.client.requestExecutor.Do(ctx, req, &catalogApplication)
391391
if err != nil {
392392
return nil, resp, err
393393
}
394394

395-
apps := make([]App, len(application))
396-
for i := range application {
397-
apps[i] = &application[i]
398-
}
399-
return apps, resp, nil
400-
395+
return catalogApplication, resp, nil
401396
}
402397

403398
func (m *GroupResource) RemoveApplicationTargetFromApplicationAdministratorRoleGivenToGroup(ctx context.Context, groupId string, roleId string, appName string) (*Response, error) {

okta/inlineHookStatus.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2018 - Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
18+
19+
package okta
20+
21+
import ()
22+
23+
type InlineHookStatus string

okta/inlineHookType.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2018 - Present Okta, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
18+
19+
package okta
20+
21+
import ()
22+
23+
type InlineHookType string

okta/jsonWebKey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type JsonWebKey struct {
2727
Alg string `json:"alg,omitempty"`
2828
Created *time.Time `json:"created,omitempty"`
2929
E string `json:"e,omitempty"`
30-
ExpiresAt string `json:"expiresAt,omitempty"`
30+
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
3131
KeyOps []string `json:"key_ops,omitempty"`
3232
Kid string `json:"kid,omitempty"`
3333
Kty string `json:"kty,omitempty"`

0 commit comments

Comments
 (0)