Skip to content

Latest commit

 

History

History
868 lines (551 loc) · 27 KB

AuthenticatorAPI.md

File metadata and controls

868 lines (551 loc) · 27 KB

\AuthenticatorAPI

All URIs are relative to https://subdomain.okta.com

Method HTTP request Description
ActivateAuthenticator Post /api/v1/authenticators/{authenticatorId}/lifecycle/activate Activate an Authenticator
ActivateAuthenticatorMethod Post /api/v1/authenticators/{authenticatorId}/methods/{methodType}/lifecycle/activate Activate an Authenticator Method
CreateAuthenticator Post /api/v1/authenticators Create an Authenticator
DeactivateAuthenticator Post /api/v1/authenticators/{authenticatorId}/lifecycle/deactivate Deactivate an Authenticator
DeactivateAuthenticatorMethod Post /api/v1/authenticators/{authenticatorId}/methods/{methodType}/lifecycle/deactivate Deactivate an Authenticator Method
GetAuthenticator Get /api/v1/authenticators/{authenticatorId} Retrieve an Authenticator
GetAuthenticatorMethod Get /api/v1/authenticators/{authenticatorId}/methods/{methodType} Retrieve a Method
GetWellKnownAppAuthenticatorConfiguration Get /.well-known/app-authenticator-configuration Retrieve the Well-Known App Authenticator Configuration
ListAuthenticatorMethods Get /api/v1/authenticators/{authenticatorId}/methods List all Methods of an Authenticator
ListAuthenticators Get /api/v1/authenticators List all Authenticators
ReplaceAuthenticator Put /api/v1/authenticators/{authenticatorId} Replace an Authenticator
ReplaceAuthenticatorMethod Put /api/v1/authenticators/{authenticatorId}/methods/{methodType} Replace a Method

ActivateAuthenticator

Authenticator ActivateAuthenticator(ctx, authenticatorId).Execute()

Activate an Authenticator

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.ActivateAuthenticator(context.Background(), authenticatorId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.ActivateAuthenticator``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ActivateAuthenticator`: Authenticator
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.ActivateAuthenticator`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator

Other Parameters

Other parameters are passed through a pointer to a apiActivateAuthenticatorRequest struct via the builder pattern

Name Type Description Notes

Return type

Authenticator

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ActivateAuthenticatorMethod

ListAuthenticatorMethods200ResponseInner ActivateAuthenticatorMethod(ctx, authenticatorId, methodType).Execute()

Activate an Authenticator Method

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator
    methodType := openapiclient.AuthenticatorMethodType("cert") // AuthenticatorMethodType | Type of the authenticator method

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.ActivateAuthenticatorMethod(context.Background(), authenticatorId, methodType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.ActivateAuthenticatorMethod``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ActivateAuthenticatorMethod`: ListAuthenticatorMethods200ResponseInner
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.ActivateAuthenticatorMethod`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator
methodType AuthenticatorMethodType Type of the authenticator method

Other Parameters

Other parameters are passed through a pointer to a apiActivateAuthenticatorMethodRequest struct via the builder pattern

Name Type Description Notes

Return type

ListAuthenticatorMethods200ResponseInner

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateAuthenticator

Authenticator CreateAuthenticator(ctx).Authenticator(authenticator).Activate(activate).Execute()

Create an Authenticator

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticator := *openapiclient.NewAuthenticator() // Authenticator | 
    activate := true // bool | Whether to execute the activation lifecycle operation when Okta creates the authenticator (optional) (default to false)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.CreateAuthenticator(context.Background()).Authenticator(authenticator).Activate(activate).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.CreateAuthenticator``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateAuthenticator`: Authenticator
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.CreateAuthenticator`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateAuthenticatorRequest struct via the builder pattern

Name Type Description Notes
authenticator Authenticator
activate bool Whether to execute the activation lifecycle operation when Okta creates the authenticator [default to false]

Return type

Authenticator

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeactivateAuthenticator

Authenticator DeactivateAuthenticator(ctx, authenticatorId).Execute()

Deactivate an Authenticator

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.DeactivateAuthenticator(context.Background(), authenticatorId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.DeactivateAuthenticator``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeactivateAuthenticator`: Authenticator
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.DeactivateAuthenticator`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator

Other Parameters

Other parameters are passed through a pointer to a apiDeactivateAuthenticatorRequest struct via the builder pattern

Name Type Description Notes

Return type

Authenticator

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeactivateAuthenticatorMethod

ListAuthenticatorMethods200ResponseInner DeactivateAuthenticatorMethod(ctx, authenticatorId, methodType).Execute()

Deactivate an Authenticator Method

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator
    methodType := openapiclient.AuthenticatorMethodType("cert") // AuthenticatorMethodType | Type of the authenticator method

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.DeactivateAuthenticatorMethod(context.Background(), authenticatorId, methodType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.DeactivateAuthenticatorMethod``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeactivateAuthenticatorMethod`: ListAuthenticatorMethods200ResponseInner
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.DeactivateAuthenticatorMethod`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator
methodType AuthenticatorMethodType Type of the authenticator method

Other Parameters

Other parameters are passed through a pointer to a apiDeactivateAuthenticatorMethodRequest struct via the builder pattern

Name Type Description Notes

Return type

ListAuthenticatorMethods200ResponseInner

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAuthenticator

Authenticator GetAuthenticator(ctx, authenticatorId).Expand(expand).Execute()

Retrieve an Authenticator

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator
    expand := []string{"Expand_example"} // []string | Specifies additional metadata for the response (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.GetAuthenticator(context.Background(), authenticatorId).Expand(expand).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.GetAuthenticator``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetAuthenticator`: Authenticator
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.GetAuthenticator`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator

Other Parameters

Other parameters are passed through a pointer to a apiGetAuthenticatorRequest struct via the builder pattern

Name Type Description Notes

expand | []string | Specifies additional metadata for the response |

Return type

Authenticator

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAuthenticatorMethod

ListAuthenticatorMethods200ResponseInner GetAuthenticatorMethod(ctx, authenticatorId, methodType).Execute()

Retrieve a Method

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator
    methodType := openapiclient.AuthenticatorMethodType("cert") // AuthenticatorMethodType | Type of the authenticator method

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.GetAuthenticatorMethod(context.Background(), authenticatorId, methodType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.GetAuthenticatorMethod``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetAuthenticatorMethod`: ListAuthenticatorMethods200ResponseInner
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.GetAuthenticatorMethod`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator
methodType AuthenticatorMethodType Type of the authenticator method

Other Parameters

Other parameters are passed through a pointer to a apiGetAuthenticatorMethodRequest struct via the builder pattern

Name Type Description Notes

Return type

ListAuthenticatorMethods200ResponseInner

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetWellKnownAppAuthenticatorConfiguration

[]WellKnownAppAuthenticatorConfiguration GetWellKnownAppAuthenticatorConfiguration(ctx).OauthClientId(oauthClientId).Execute()

Retrieve the Well-Known App Authenticator Configuration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    oauthClientId := "oauthClientId_example" // string | Filters app authenticator configurations by `oauthClientId`

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.GetWellKnownAppAuthenticatorConfiguration(context.Background()).OauthClientId(oauthClientId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.GetWellKnownAppAuthenticatorConfiguration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetWellKnownAppAuthenticatorConfiguration`: []WellKnownAppAuthenticatorConfiguration
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.GetWellKnownAppAuthenticatorConfiguration`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetWellKnownAppAuthenticatorConfigurationRequest struct via the builder pattern

Name Type Description Notes
oauthClientId string Filters app authenticator configurations by `oauthClientId`

Return type

[]WellKnownAppAuthenticatorConfiguration

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListAuthenticatorMethods

[]ListAuthenticatorMethods200ResponseInner ListAuthenticatorMethods(ctx, authenticatorId).Execute()

List all Methods of an Authenticator

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.ListAuthenticatorMethods(context.Background(), authenticatorId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.ListAuthenticatorMethods``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListAuthenticatorMethods`: []ListAuthenticatorMethods200ResponseInner
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.ListAuthenticatorMethods`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator

Other Parameters

Other parameters are passed through a pointer to a apiListAuthenticatorMethodsRequest struct via the builder pattern

Name Type Description Notes

Return type

[]ListAuthenticatorMethods200ResponseInner

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListAuthenticators

[]Authenticator ListAuthenticators(ctx).Expand(expand).Execute()

List all Authenticators

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    expand := []string{"Expand_example"} // []string | Specifies additional metadata for the response (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.ListAuthenticators(context.Background()).Expand(expand).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.ListAuthenticators``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListAuthenticators`: []Authenticator
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.ListAuthenticators`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListAuthenticatorsRequest struct via the builder pattern

Name Type Description Notes
expand []string Specifies additional metadata for the response

Return type

[]Authenticator

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ReplaceAuthenticator

Authenticator ReplaceAuthenticator(ctx, authenticatorId).Authenticator(authenticator).Execute()

Replace an Authenticator

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator
    authenticator := *openapiclient.NewAuthenticator() // Authenticator | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.ReplaceAuthenticator(context.Background(), authenticatorId).Authenticator(authenticator).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.ReplaceAuthenticator``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ReplaceAuthenticator`: Authenticator
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.ReplaceAuthenticator`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator

Other Parameters

Other parameters are passed through a pointer to a apiReplaceAuthenticatorRequest struct via the builder pattern

Name Type Description Notes

authenticator | Authenticator | |

Return type

Authenticator

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ReplaceAuthenticatorMethod

ListAuthenticatorMethods200ResponseInner ReplaceAuthenticatorMethod(ctx, authenticatorId, methodType).ListAuthenticatorMethods200ResponseInner(listAuthenticatorMethods200ResponseInner).Execute()

Replace a Method

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    authenticatorId := "aut1nd8PQhGcQtSxB0g4" // string | `id` of the Authenticator
    methodType := openapiclient.AuthenticatorMethodType("cert") // AuthenticatorMethodType | Type of the authenticator method
    listAuthenticatorMethods200ResponseInner := openapiclient.listAuthenticatorMethods_200_response_inner{AuthenticatorMethodOtp: openapiclient.NewAuthenticatorMethodOtp()} // ListAuthenticatorMethods200ResponseInner |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticatorAPI.ReplaceAuthenticatorMethod(context.Background(), authenticatorId, methodType).ListAuthenticatorMethods200ResponseInner(listAuthenticatorMethods200ResponseInner).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticatorAPI.ReplaceAuthenticatorMethod``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ReplaceAuthenticatorMethod`: ListAuthenticatorMethods200ResponseInner
    fmt.Fprintf(os.Stdout, "Response from `AuthenticatorAPI.ReplaceAuthenticatorMethod`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
authenticatorId string `id` of the Authenticator
methodType AuthenticatorMethodType Type of the authenticator method

Other Parameters

Other parameters are passed through a pointer to a apiReplaceAuthenticatorMethodRequest struct via the builder pattern

Name Type Description Notes

listAuthenticatorMethods200ResponseInner | ListAuthenticatorMethods200ResponseInner | |

Return type

ListAuthenticatorMethods200ResponseInner

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]