All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
ActivateAuthorizationServer | Post /api/v1/authorizationServers/{authServerId}/lifecycle/activate | Activate an Authorization Server |
ActivateAuthorizationServerPolicy | Post /api/v1/authorizationServers/{authServerId}/policies/{policyId}/lifecycle/activate | Activate a Policy |
ActivateAuthorizationServerPolicyRule | Post /api/v1/authorizationServers/{authServerId}/policies/{policyId}/rules/{ruleId}/lifecycle/activate | Activate a Policy Rule |
CreateAuthorizationServer | Post /api/v1/authorizationServers | Create an Authorization Server |
CreateAuthorizationServerPolicy | Post /api/v1/authorizationServers/{authServerId}/policies | Create a Policy |
CreateAuthorizationServerPolicyRule | Post /api/v1/authorizationServers/{authServerId}/policies/{policyId}/rules | Create a Policy Rule |
CreateOAuth2Scope | Post /api/v1/authorizationServers/{authServerId}/scopes | Create a Custom Token Scope |
DeactivateAuthorizationServer | Post /api/v1/authorizationServers/{authServerId}/lifecycle/deactivate | Deactivate an Authorization Server |
DeactivateAuthorizationServerPolicy | Post /api/v1/authorizationServers/{authServerId}/policies/{policyId}/lifecycle/deactivate | Deactivate a Policy |
DeactivateAuthorizationServerPolicyRule | Post /api/v1/authorizationServers/{authServerId}/policies/{policyId}/rules/{ruleId}/lifecycle/deactivate | Deactivate a Policy Rule |
DeleteAuthorizationServer | Delete /api/v1/authorizationServers/{authServerId} | Delete an Authorization Server |
DeleteAuthorizationServerPolicy | Delete /api/v1/authorizationServers/{authServerId}/policies/{policyId} | Delete a Policy |
DeleteAuthorizationServerPolicyRule | Delete /api/v1/authorizationServers/{authServerId}/policies/{policyId}/rules/{ruleId} | Delete a Policy Rule |
DeleteOAuth2Scope | Delete /api/v1/authorizationServers/{authServerId}/scopes/{scopeId} | Delete a Custom Token Scope |
GetAuthorizationServer | Get /api/v1/authorizationServers/{authServerId} | Retrieve an Authorization Server |
GetAuthorizationServerPolicy | Get /api/v1/authorizationServers/{authServerId}/policies/{policyId} | Retrieve a Policy |
GetAuthorizationServerPolicyRule | Get /api/v1/authorizationServers/{authServerId}/policies/{policyId}/rules/{ruleId} | Retrieve a Policy Rule |
GetOAuth2Scope | Get /api/v1/authorizationServers/{authServerId}/scopes/{scopeId} | Retrieve a Custom Token Scope |
GetRefreshTokenForAuthorizationServerAndClient | Get /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens/{tokenId} | Retrieve a Refresh Token for a Client |
ListAuthorizationServerKeys | Get /api/v1/authorizationServers/{authServerId}/credentials/keys | List all Credential Keys |
ListAuthorizationServerPolicies | Get /api/v1/authorizationServers/{authServerId}/policies | List all Policies |
ListAuthorizationServerPolicyRules | Get /api/v1/authorizationServers/{authServerId}/policies/{policyId}/rules | List all Policy Rules |
ListAuthorizationServers | Get /api/v1/authorizationServers | List all Authorization Servers |
ListOAuth2ClientsForAuthorizationServer | Get /api/v1/authorizationServers/{authServerId}/clients | List all Clients |
ListOAuth2Scopes | Get /api/v1/authorizationServers/{authServerId}/scopes | List all Custom Token Scopes |
ListRefreshTokensForAuthorizationServerAndClient | Get /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens | List all Refresh Tokens for a Client |
ReplaceAuthorizationServer | Put /api/v1/authorizationServers/{authServerId} | Replace an Authorization Server |
ReplaceAuthorizationServerPolicy | Put /api/v1/authorizationServers/{authServerId}/policies/{policyId} | Replace a Policy |
ReplaceAuthorizationServerPolicyRule | Put /api/v1/authorizationServers/{authServerId}/policies/{policyId}/rules/{ruleId} | Replace a Policy Rule |
ReplaceOAuth2Scope | Put /api/v1/authorizationServers/{authServerId}/scopes/{scopeId} | Replace a Custom Token Scope |
RevokeRefreshTokenForAuthorizationServerAndClient | Delete /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens/{tokenId} | Revoke a Refresh Token for a Client |
RevokeRefreshTokensForAuthorizationServerAndClient | Delete /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens | Revoke all Refresh Tokens for a Client |
RotateAuthorizationServerKeys | Post /api/v1/authorizationServers/{authServerId}/credentials/lifecycle/keyRotate | Rotate all Credential Keys |
ActivateAuthorizationServer(ctx, authServerId).Execute()
Activate an Authorization Server
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.ActivateAuthorizationServer(context.Background(), authServerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ActivateAuthorizationServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiActivateAuthorizationServerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ActivateAuthorizationServerPolicy(ctx, authServerId, policyId).Execute()
Activate a Policy
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.ActivateAuthorizationServerPolicy(context.Background(), authServerId, policyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ActivateAuthorizationServerPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiActivateAuthorizationServerPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ActivateAuthorizationServerPolicyRule(ctx, authServerId, policyId, ruleId).Execute()
Activate a Policy Rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
ruleId := "ruld3hJ7jZh4fn0st0g3" // string | `id` of the Policy Rule
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.ActivateAuthorizationServerPolicyRule(context.Background(), authServerId, policyId, ruleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ActivateAuthorizationServerPolicyRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy | |
ruleId | string | `id` of the Policy Rule |
Other parameters are passed through a pointer to a apiActivateAuthorizationServerPolicyRuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServer CreateAuthorizationServer(ctx).AuthorizationServer(authorizationServer).Execute()
Create an Authorization Server
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authorizationServer := *openapiclient.NewAuthorizationServer() // AuthorizationServer |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.CreateAuthorizationServer(context.Background()).AuthorizationServer(authorizationServer).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.CreateAuthorizationServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAuthorizationServer`: AuthorizationServer
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.CreateAuthorizationServer`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateAuthorizationServerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authorizationServer | AuthorizationServer |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServerPolicy CreateAuthorizationServerPolicy(ctx, authServerId).Policy(policy).Execute()
Create a Policy
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policy := *openapiclient.NewAuthorizationServerPolicy() // AuthorizationServerPolicy |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.CreateAuthorizationServerPolicy(context.Background(), authServerId).Policy(policy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.CreateAuthorizationServerPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAuthorizationServerPolicy`: AuthorizationServerPolicy
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.CreateAuthorizationServerPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiCreateAuthorizationServerPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
policy | AuthorizationServerPolicy | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServerPolicyRule CreateAuthorizationServerPolicyRule(ctx, authServerId, policyId).PolicyRule(policyRule).Execute()
Create a Policy Rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
policyRule := *openapiclient.NewAuthorizationServerPolicyRule() // AuthorizationServerPolicyRule |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.CreateAuthorizationServerPolicyRule(context.Background(), authServerId, policyId).PolicyRule(policyRule).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.CreateAuthorizationServerPolicyRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAuthorizationServerPolicyRule`: AuthorizationServerPolicyRule
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.CreateAuthorizationServerPolicyRule`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiCreateAuthorizationServerPolicyRuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
policyRule | AuthorizationServerPolicyRule | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OAuth2Scope CreateOAuth2Scope(ctx, authServerId).OAuth2Scope(oAuth2Scope).Execute()
Create a Custom Token Scope
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
oAuth2Scope := *openapiclient.NewOAuth2Scope() // OAuth2Scope |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.CreateOAuth2Scope(context.Background(), authServerId).OAuth2Scope(oAuth2Scope).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.CreateOAuth2Scope``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateOAuth2Scope`: OAuth2Scope
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.CreateOAuth2Scope`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiCreateOAuth2ScopeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
oAuth2Scope | OAuth2Scope | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeactivateAuthorizationServer(ctx, authServerId).Execute()
Deactivate an Authorization Server
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.DeactivateAuthorizationServer(context.Background(), authServerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.DeactivateAuthorizationServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiDeactivateAuthorizationServerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeactivateAuthorizationServerPolicy(ctx, authServerId, policyId).Execute()
Deactivate a Policy
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.DeactivateAuthorizationServerPolicy(context.Background(), authServerId, policyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.DeactivateAuthorizationServerPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiDeactivateAuthorizationServerPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeactivateAuthorizationServerPolicyRule(ctx, authServerId, policyId, ruleId).Execute()
Deactivate a Policy Rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
ruleId := "ruld3hJ7jZh4fn0st0g3" // string | `id` of the Policy Rule
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.DeactivateAuthorizationServerPolicyRule(context.Background(), authServerId, policyId, ruleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.DeactivateAuthorizationServerPolicyRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy | |
ruleId | string | `id` of the Policy Rule |
Other parameters are passed through a pointer to a apiDeactivateAuthorizationServerPolicyRuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteAuthorizationServer(ctx, authServerId).Execute()
Delete an Authorization Server
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.DeleteAuthorizationServer(context.Background(), authServerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.DeleteAuthorizationServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiDeleteAuthorizationServerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteAuthorizationServerPolicy(ctx, authServerId, policyId).Execute()
Delete a Policy
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.DeleteAuthorizationServerPolicy(context.Background(), authServerId, policyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.DeleteAuthorizationServerPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiDeleteAuthorizationServerPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteAuthorizationServerPolicyRule(ctx, authServerId, policyId, ruleId).Execute()
Delete a Policy Rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
ruleId := "ruld3hJ7jZh4fn0st0g3" // string | `id` of the Policy Rule
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.DeleteAuthorizationServerPolicyRule(context.Background(), authServerId, policyId, ruleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.DeleteAuthorizationServerPolicyRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy | |
ruleId | string | `id` of the Policy Rule |
Other parameters are passed through a pointer to a apiDeleteAuthorizationServerPolicyRuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteOAuth2Scope(ctx, authServerId, scopeId).Execute()
Delete a Custom Token Scope
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
scopeId := "0TMRpCWXRKFjP7HiPFNM" // string | `id` of Scope
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.DeleteOAuth2Scope(context.Background(), authServerId, scopeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.DeleteOAuth2Scope``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
scopeId | string | `id` of Scope |
Other parameters are passed through a pointer to a apiDeleteOAuth2ScopeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServer GetAuthorizationServer(ctx, authServerId).Execute()
Retrieve an Authorization Server
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.GetAuthorizationServer(context.Background(), authServerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.GetAuthorizationServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAuthorizationServer`: AuthorizationServer
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.GetAuthorizationServer`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiGetAuthorizationServerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServerPolicy GetAuthorizationServerPolicy(ctx, authServerId, policyId).Execute()
Retrieve a Policy
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.GetAuthorizationServerPolicy(context.Background(), authServerId, policyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.GetAuthorizationServerPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAuthorizationServerPolicy`: AuthorizationServerPolicy
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.GetAuthorizationServerPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiGetAuthorizationServerPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServerPolicyRule GetAuthorizationServerPolicyRule(ctx, authServerId, policyId, ruleId).Execute()
Retrieve a Policy Rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
ruleId := "ruld3hJ7jZh4fn0st0g3" // string | `id` of the Policy Rule
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.GetAuthorizationServerPolicyRule(context.Background(), authServerId, policyId, ruleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.GetAuthorizationServerPolicyRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAuthorizationServerPolicyRule`: AuthorizationServerPolicyRule
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.GetAuthorizationServerPolicyRule`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy | |
ruleId | string | `id` of the Policy Rule |
Other parameters are passed through a pointer to a apiGetAuthorizationServerPolicyRuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OAuth2Scope GetOAuth2Scope(ctx, authServerId, scopeId).Execute()
Retrieve a Custom Token Scope
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
scopeId := "0TMRpCWXRKFjP7HiPFNM" // string | `id` of Scope
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.GetOAuth2Scope(context.Background(), authServerId, scopeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.GetOAuth2Scope``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOAuth2Scope`: OAuth2Scope
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.GetOAuth2Scope`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
scopeId | string | `id` of Scope |
Other parameters are passed through a pointer to a apiGetOAuth2ScopeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OAuth2RefreshToken GetRefreshTokenForAuthorizationServerAndClient(ctx, authServerId, clientId, tokenId).Expand(expand).Execute()
Retrieve a Refresh Token for a Client
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
clientId := "52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD" // string | `client_id` of the app
tokenId := "sHHSth53yJAyNSTQKDJZ" // string | `id` of Token
expand := "expand_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.GetRefreshTokenForAuthorizationServerAndClient(context.Background(), authServerId, clientId, tokenId).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.GetRefreshTokenForAuthorizationServerAndClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRefreshTokenForAuthorizationServerAndClient`: OAuth2RefreshToken
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.GetRefreshTokenForAuthorizationServerAndClient`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
clientId | string | `client_id` of the app | |
tokenId | string | `id` of Token |
Other parameters are passed through a pointer to a apiGetRefreshTokenForAuthorizationServerAndClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expand | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]JsonWebKey ListAuthorizationServerKeys(ctx, authServerId).Execute()
List all Credential Keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ListAuthorizationServerKeys(context.Background(), authServerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ListAuthorizationServerKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAuthorizationServerKeys`: []JsonWebKey
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ListAuthorizationServerKeys`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiListAuthorizationServerKeysRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AuthorizationServerPolicy ListAuthorizationServerPolicies(ctx, authServerId).Execute()
List all Policies
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ListAuthorizationServerPolicies(context.Background(), authServerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ListAuthorizationServerPolicies``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAuthorizationServerPolicies`: []AuthorizationServerPolicy
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ListAuthorizationServerPolicies`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiListAuthorizationServerPoliciesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AuthorizationServerPolicyRule ListAuthorizationServerPolicyRules(ctx, authServerId, policyId).Execute()
List all Policy Rules
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ListAuthorizationServerPolicyRules(context.Background(), authServerId, policyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ListAuthorizationServerPolicyRules``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAuthorizationServerPolicyRules`: []AuthorizationServerPolicyRule
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ListAuthorizationServerPolicyRules`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiListAuthorizationServerPolicyRulesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[]AuthorizationServerPolicyRule
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AuthorizationServer ListAuthorizationServers(ctx).Q(q).Limit(limit).After(after).Execute()
List all Authorization Servers
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
q := "customasone" // string | Searches the `name` and `audiences` of authorization servers for matching values (optional)
limit := int32(56) // int32 | Specifies the number of authorization server results on a page. Maximum value: 200 (optional) (default to 200)
after := "after_example" // string | Specifies the pagination cursor for the next page of authorization servers. Treat as an opaque value and obtain through the next link relationship. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ListAuthorizationServers(context.Background()).Q(q).Limit(limit).After(after).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ListAuthorizationServers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAuthorizationServers`: []AuthorizationServer
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ListAuthorizationServers`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListAuthorizationServersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
q | string | Searches the `name` and `audiences` of authorization servers for matching values | |
limit | int32 | Specifies the number of authorization server results on a page. Maximum value: 200 | [default to 200] |
after | string | Specifies the pagination cursor for the next page of authorization servers. Treat as an opaque value and obtain through the next link relationship. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]OAuth2Client ListOAuth2ClientsForAuthorizationServer(ctx, authServerId).Execute()
List all Clients
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ListOAuth2ClientsForAuthorizationServer(context.Background(), authServerId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ListOAuth2ClientsForAuthorizationServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListOAuth2ClientsForAuthorizationServer`: []OAuth2Client
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ListOAuth2ClientsForAuthorizationServer`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiListOAuth2ClientsForAuthorizationServerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]OAuth2Scope ListOAuth2Scopes(ctx, authServerId).Q(q).Filter(filter).Cursor(cursor).Limit(limit).Execute()
List all Custom Token Scopes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
q := "q_example" // string | (optional)
filter := "filter_example" // string | (optional)
cursor := "cursor_example" // string | (optional)
limit := int32(56) // int32 | (optional) (default to -1)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ListOAuth2Scopes(context.Background(), authServerId).Q(q).Filter(filter).Cursor(cursor).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ListOAuth2Scopes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListOAuth2Scopes`: []OAuth2Scope
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ListOAuth2Scopes`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiListOAuth2ScopesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
q | string | | filter | string | | cursor | string | | limit | int32 | | [default to -1]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]OAuth2RefreshToken ListRefreshTokensForAuthorizationServerAndClient(ctx, authServerId, clientId).Expand(expand).After(after).Limit(limit).Execute()
List all Refresh Tokens for a Client
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
clientId := "52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD" // string | `client_id` of the app
expand := "expand_example" // string | (optional)
after := "after_example" // string | (optional)
limit := int32(56) // int32 | (optional) (default to -1)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ListRefreshTokensForAuthorizationServerAndClient(context.Background(), authServerId, clientId).Expand(expand).After(after).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ListRefreshTokensForAuthorizationServerAndClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListRefreshTokensForAuthorizationServerAndClient`: []OAuth2RefreshToken
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ListRefreshTokensForAuthorizationServerAndClient`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
clientId | string | `client_id` of the app |
Other parameters are passed through a pointer to a apiListRefreshTokensForAuthorizationServerAndClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expand | string | | after | string | | limit | int32 | | [default to -1]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServer ReplaceAuthorizationServer(ctx, authServerId).AuthorizationServer(authorizationServer).Execute()
Replace an Authorization Server
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
authorizationServer := *openapiclient.NewAuthorizationServer() // AuthorizationServer |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ReplaceAuthorizationServer(context.Background(), authServerId).AuthorizationServer(authorizationServer).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ReplaceAuthorizationServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReplaceAuthorizationServer`: AuthorizationServer
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ReplaceAuthorizationServer`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiReplaceAuthorizationServerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
authorizationServer | AuthorizationServer | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServerPolicy ReplaceAuthorizationServerPolicy(ctx, authServerId, policyId).Policy(policy).Execute()
Replace a Policy
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
policy := *openapiclient.NewAuthorizationServerPolicy() // AuthorizationServerPolicy |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ReplaceAuthorizationServerPolicy(context.Background(), authServerId, policyId).Policy(policy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ReplaceAuthorizationServerPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReplaceAuthorizationServerPolicy`: AuthorizationServerPolicy
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ReplaceAuthorizationServerPolicy`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy |
Other parameters are passed through a pointer to a apiReplaceAuthorizationServerPolicyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
policy | AuthorizationServerPolicy | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorizationServerPolicyRule ReplaceAuthorizationServerPolicyRule(ctx, authServerId, policyId, ruleId).PolicyRule(policyRule).Execute()
Replace a Policy Rule
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
policyId := "00plrilJ7jZ66Gn0X0g3" // string | `id` of the Policy
ruleId := "ruld3hJ7jZh4fn0st0g3" // string | `id` of the Policy Rule
policyRule := *openapiclient.NewAuthorizationServerPolicyRule() // AuthorizationServerPolicyRule |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ReplaceAuthorizationServerPolicyRule(context.Background(), authServerId, policyId, ruleId).PolicyRule(policyRule).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ReplaceAuthorizationServerPolicyRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReplaceAuthorizationServerPolicyRule`: AuthorizationServerPolicyRule
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ReplaceAuthorizationServerPolicyRule`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
policyId | string | `id` of the Policy | |
ruleId | string | `id` of the Policy Rule |
Other parameters are passed through a pointer to a apiReplaceAuthorizationServerPolicyRuleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
policyRule | AuthorizationServerPolicyRule | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OAuth2Scope ReplaceOAuth2Scope(ctx, authServerId, scopeId).OAuth2Scope(oAuth2Scope).Execute()
Replace a Custom Token Scope
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
scopeId := "0TMRpCWXRKFjP7HiPFNM" // string | `id` of Scope
oAuth2Scope := *openapiclient.NewOAuth2Scope() // OAuth2Scope |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.ReplaceOAuth2Scope(context.Background(), authServerId, scopeId).OAuth2Scope(oAuth2Scope).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.ReplaceOAuth2Scope``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReplaceOAuth2Scope`: OAuth2Scope
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.ReplaceOAuth2Scope`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
scopeId | string | `id` of Scope |
Other parameters are passed through a pointer to a apiReplaceOAuth2ScopeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
oAuth2Scope | OAuth2Scope | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RevokeRefreshTokenForAuthorizationServerAndClient(ctx, authServerId, clientId, tokenId).Execute()
Revoke a Refresh Token for a Client
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
clientId := "52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD" // string | `client_id` of the app
tokenId := "sHHSth53yJAyNSTQKDJZ" // string | `id` of Token
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.RevokeRefreshTokenForAuthorizationServerAndClient(context.Background(), authServerId, clientId, tokenId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.RevokeRefreshTokenForAuthorizationServerAndClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
clientId | string | `client_id` of the app | |
tokenId | string | `id` of Token |
Other parameters are passed through a pointer to a apiRevokeRefreshTokenForAuthorizationServerAndClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RevokeRefreshTokensForAuthorizationServerAndClient(ctx, authServerId, clientId).Execute()
Revoke all Refresh Tokens for a Client
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
clientId := "52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD" // string | `client_id` of the app
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AuthorizationServerAPI.RevokeRefreshTokensForAuthorizationServerAndClient(context.Background(), authServerId, clientId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.RevokeRefreshTokensForAuthorizationServerAndClient``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server | |
clientId | string | `client_id` of the app |
Other parameters are passed through a pointer to a apiRevokeRefreshTokensForAuthorizationServerAndClientRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]JsonWebKey RotateAuthorizationServerKeys(ctx, authServerId).Use(use).Execute()
Rotate all Credential Keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
authServerId := "GeGRTEr7f3yu2n7grw22" // string | `id` of the Authorization Server
use := *openapiclient.NewJwkUse() // JwkUse |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorizationServerAPI.RotateAuthorizationServerKeys(context.Background(), authServerId).Use(use).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorizationServerAPI.RotateAuthorizationServerKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RotateAuthorizationServerKeys`: []JsonWebKey
fmt.Fprintf(os.Stdout, "Response from `AuthorizationServerAPI.RotateAuthorizationServerKeys`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
authServerId | string | `id` of the Authorization Server |
Other parameters are passed through a pointer to a apiRotateAuthorizationServerKeysRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
use | JwkUse | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]