Method | HTTP request | Description |
---|---|---|
CreateConnection | Post /v1/connections | Create SSO connection |
DeleteConnection | Delete /v1/connections/{connectionId} | Delete SSO connection |
GetConnection | Get /v1/connections/{connectionId} | Retrieve SSO connection |
GetConnectionCredentials | Get /v1/connections/{connectionId}/users/{userId}/credentials | Retrieve user connection credentials |
GetConnections | Get /v1/connections | List SSO connections |
UpdateConnection | Put /v1/connections/{connectionId} | Update SSO connection |
Connection CreateConnection(ctx).Connection(connection).Execute()
Create SSO connection
package main
import (
"context"
"fmt"
"os"
authress "github.com/authress/authress-sdk.go"
)
func main() {
connection := *authress.NewConnection() // Connection |
url, _ := url.Parse("https://authress.company.com")
authressClient := authress.NewAuthressClient(authress.AuthressSettings{
AuthressApiUrl: url,
})
resp, r, err := apiClient.Connections.CreateConnection(context.Background()).Connection(connection).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Connections.CreateConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateConnection`: Connection
fmt.Fprintf(os.Stdout, "Response from `Connections.CreateConnection`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
connection | Connection |
- Content-Type: application/json
- Accept: application/links+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteConnection(ctx, connectionId).Execute()
Delete SSO connection
package main
import (
"context"
"fmt"
"os"
authress "github.com/authress/authress-sdk.go"
)
func main() {
connectionId := "connectionId_example" // string | The connection identifier.
url, _ := url.Parse("https://authress.company.com")
authressClient := authress.NewAuthressClient(authress.AuthressSettings{
AuthressApiUrl: url,
})
r, err := apiClient.Connections.DeleteConnection(context.Background(), connectionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Connections.DeleteConnection``: %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. | |
connectionId | string | The connection identifier. |
Other parameters are passed through a pointer to a apiDeleteConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Connection GetConnection(ctx, connectionId).Execute()
Retrieve SSO connection
package main
import (
"context"
"fmt"
"os"
authress "github.com/authress/authress-sdk.go"
)
func main() {
connectionId := "connectionId_example" // string | The connection identifier.
url, _ := url.Parse("https://authress.company.com")
authressClient := authress.NewAuthressClient(authress.AuthressSettings{
AuthressApiUrl: url,
})
resp, r, err := apiClient.Connections.GetConnection(context.Background(), connectionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Connections.GetConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConnection`: Connection
fmt.Fprintf(os.Stdout, "Response from `Connections.GetConnection`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
connectionId | string | The connection identifier. |
Other parameters are passed through a pointer to a apiGetConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/links+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserConnectionCredentials GetConnectionCredentials(ctx, connectionId, userId).Execute()
Retrieve user connection credentials
package main
import (
"context"
"fmt"
"os"
authress "github.com/authress/authress-sdk.go"
)
func main() {
connectionId := "connectionId_example" // string | The connection identifier.
userId := TODO // UserId | The connection user.
url, _ := url.Parse("https://authress.company.com")
authressClient := authress.NewAuthressClient(authress.AuthressSettings{
AuthressApiUrl: url,
})
resp, r, err := apiClient.Connections.GetConnectionCredentials(context.Background(), connectionId, userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Connections.GetConnectionCredentials``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConnectionCredentials`: UserConnectionCredentials
fmt.Fprintf(os.Stdout, "Response from `Connections.GetConnectionCredentials`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
connectionId | string | The connection identifier. | |
userId | UserId | The connection user. |
Other parameters are passed through a pointer to a apiGetConnectionCredentialsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/links+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConnectionCollection GetConnections(ctx).Execute()
List SSO connections
package main
import (
"context"
"fmt"
"os"
authress "github.com/authress/authress-sdk.go"
)
func main() {
url, _ := url.Parse("https://authress.company.com")
authressClient := authress.NewAuthressClient(authress.AuthressSettings{
AuthressApiUrl: url,
})
resp, r, err := apiClient.Connections.GetConnections(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Connections.GetConnections``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConnections`: ConnectionCollection
fmt.Fprintf(os.Stdout, "Response from `Connections.GetConnections`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetConnectionsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/links+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Connection UpdateConnection(ctx, connectionId).Connection(connection).Execute()
Update SSO connection
package main
import (
"context"
"fmt"
"os"
authress "github.com/authress/authress-sdk.go"
)
func main() {
connectionId := "connectionId_example" // string | The connection identifier.
connection := *authress.NewConnection() // Connection |
url, _ := url.Parse("https://authress.company.com")
authressClient := authress.NewAuthressClient(authress.AuthressSettings{
AuthressApiUrl: url,
})
resp, r, err := apiClient.Connections.UpdateConnection(context.Background(), connectionId).Connection(connection).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Connections.UpdateConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateConnection`: Connection
fmt.Fprintf(os.Stdout, "Response from `Connections.UpdateConnection`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
connectionId | string | The connection identifier. |
Other parameters are passed through a pointer to a apiUpdateConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
connection | Connection | |
- Content-Type: application/json
- Accept: application/links+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]