All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AssertSaml | Post /api/authn/saml/{connectorId} | SAML ACS endpoint (social) |
AssertSingleSignOnSaml | Post /api/authn/single-sign-on/saml/{connectorId} | SAML ACS endpoint (SSO) |
GetHasuraAuth | Get /api/authn/hasura | Hasura auth hook endpoint |
AssertSaml(ctx, connectorId).Body(body).Execute()
SAML ACS endpoint (social)
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
connectorId := "connectorId_example" // string | The unique identifier of the connector.
body := map[string]interface{}{ ... } // map[string]interface{} |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.AuthnAPI.AssertSaml(context.Background(), connectorId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthnAPI.AssertSaml``: %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. | |
connectorId | string | The unique identifier of the connector. |
Other parameters are passed through a pointer to a apiAssertSamlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | map[string]interface{} | |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssertSingleSignOnSaml(ctx, connectorId).AssertSingleSignOnSamlRequest(assertSingleSignOnSamlRequest).Execute()
SAML ACS endpoint (SSO)
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
connectorId := "connectorId_example" // string | The unique identifier of the connector.
assertSingleSignOnSamlRequest := *logto.NewAssertSingleSignOnSamlRequest("RelayState_example", "SAMLResponse_example") // AssertSingleSignOnSamlRequest |
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
r, err := apiClient.AuthnAPI.AssertSingleSignOnSaml(context.Background(), connectorId).AssertSingleSignOnSamlRequest(assertSingleSignOnSamlRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthnAPI.AssertSingleSignOnSaml``: %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. | |
connectorId | string | The unique identifier of the connector. |
Other parameters are passed through a pointer to a apiAssertSingleSignOnSamlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
assertSingleSignOnSamlRequest | AssertSingleSignOnSamlRequest | |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetHasuraAuth200Response GetHasuraAuth(ctx).Resource(resource).UnauthorizedRole(unauthorizedRole).Execute()
Hasura auth hook endpoint
package main
import (
"context"
"fmt"
"os"
logto "github.com/mostafa/go-api-client"
)
func main() {
resource := "resource_example" // string |
unauthorizedRole := "unauthorizedRole_example" // string | (optional)
configuration := logto.NewConfiguration()
apiClient := logto.NewAPIClient(configuration)
resp, r, err := apiClient.AuthnAPI.GetHasuraAuth(context.Background()).Resource(resource).UnauthorizedRole(unauthorizedRole).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthnAPI.GetHasuraAuth``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHasuraAuth`: GetHasuraAuth200Response
fmt.Fprintf(os.Stdout, "Response from `AuthnAPI.GetHasuraAuth`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetHasuraAuthRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
resource | string | ||
unauthorizedRole | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]