### Install and Use Ory CLI for Kratos Quickstart Source: https://github.com/ory/kratos/blob/master/README.md This snippet demonstrates how to install the Ory CLI using a bash script, move it to the system's PATH, authenticate with Ory, and create a new Kratos project. It's a quick way to get started with Ory Identities for development or prototyping. ```bash bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -b . ory sudo mv ./ory /usr/local/bin/ ory auth ory create project --create-workspace "Ory Open Source" --name "GitHub Quickstart" --use-project ory open ax login ``` -------------------------------- ### Install Ory Kratos from Source Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Use this make command to install Ory Kratos after cloning the repository. ```make make install ``` -------------------------------- ### Example Hydra Client Command Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-client.md An example of how to invoke the hydra client command with a placeholder flag. ```bash hydra client --whatever ``` -------------------------------- ### Install Pagination Package Source: https://github.com/ory/kratos/blob/master/oryx/pagination/README.md Command to install the Ory pagination dependency via Go modules. ```bash go get github.com/ory/pagination ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Run all regular tests that require database setup. This command recreates databases on each run. ```make make test ``` -------------------------------- ### Install Dependencies for Go API Client Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Install necessary Go dependencies for the API client, including testing utilities and network context. ```sh go get github.com/stretchr/testify/assert go get golang.org/x/net/context ``` -------------------------------- ### Run the hydra serve command Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-serve.md Use this command to start and manage the Ory Hydra server. It accepts various flags for configuration. ```bash hydra serve [flags] ``` -------------------------------- ### Hydra Client Public Usage Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-client-public.md The command syntax for starting the public server. It accepts optional arguments and supports standard help flags. ```bash hydra client public [flags] ``` -------------------------------- ### Run Hydra Client Admin Server Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-client-admin.md Use this command to start the admin server for the Hydra client. It accepts arguments and flags for configuration. ```bash short with multiple ``` ```bash <[some argument]> <[some argument]> <[some argument]> <[some argument]> <[some argument]> ``` ```bash hydra client admin [flags] ``` ```bash -h, --help help for admin ``` -------------------------------- ### Clone and Fork Ory Kratos Repository Source: https://github.com/ory/kratos/blob/master/CONTRIBUTING.md Steps to clone the original Ory Kratos repository and set up a remote for your personal fork. This is the initial setup for contributing. ```bash git clone git@github.com:ory/ory/kratos.git ``` ```bash git remote add fork git@github.com:/ory/kratos.git ``` ```bash git fetch origin git checkout master git pull --rebase ``` ```bash git checkout my-feature-branch ``` ```bash git add -A git commit -a -m "fix: this is the subject line" -m "This is the body line. Closes #123" ``` ```bash git push -u fork my-feature-branch ``` -------------------------------- ### Utility Function to Get Pointer to Int32 Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Demonstrates how to use the PtrInt32 utility function to get a pointer to an int32 value. This is commonly used for pointer-based struct members. ```go ptrInt32 := client.PtrInt32(int32(1)) ``` -------------------------------- ### Install Rosetta 2 on M1 Macs Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Required for running Cypress end-to-end tests on ARM-based Macs. Follow the official Cypress documentation for details. ```bash softwareupdate --install-rosetta --agree-to-license ``` -------------------------------- ### Schema Reference Configuration Source: https://github.com/ory/kratos/blob/master/test/schema/README.md Example of how to define schema references in a YAML test case. By using string pointers, the validator replaces these $ref values with constants, allowing for modular testing of individual definitions. ```yaml default_browser_return_url: "#/definitions/defaultReturnTo" hooks: - "#/definitions/selfServiceSessionRevokerHook" ``` -------------------------------- ### Utility Function to Get Pointer to Float32 Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Demonstrates the PtrFloat32 utility function for getting a pointer to a float32 value. This is useful for pointer-based struct members. ```go ptrFloat32 := client.PtrFloat32(float32(1.0)) ``` -------------------------------- ### Configure Operation-Specific Server URLs Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Override default server URLs for specific API operations using context maps for server indices and variables. This example shows setting a custom port for an operation. ```go ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) ctx = context.WithValue(context.Background(), client.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, }) ``` -------------------------------- ### Utility Function to Get Pointer to Float Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Illustrates using the PtrFloat utility function to create a pointer to a float value. This is helpful for pointer-based struct fields. ```go ptrFloat := client.PtrFloat(float32(1.0)) ``` -------------------------------- ### Utility Function to Get Pointer to Int64 Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Shows the usage of the PtrInt64 utility function to obtain a pointer to an int64 value. Useful for pointer-based struct fields. ```go ptrInt64 := client.PtrInt64(int64(1)) ``` -------------------------------- ### Utility Function to Get Pointer to Time Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Illustrates the usage of the PtrTime utility function for creating a pointer to a time.Time value. This is helpful for pointer-based struct fields. ```go now := time.Now() ptrTime := client.PtrTime(now) ``` -------------------------------- ### Utility Function to Get Pointer to Float64 Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Shows how to use the PtrFloat64 utility function to obtain a pointer to a float64 value. This is commonly used for pointer-based struct fields. ```go ptrFloat64 := client.PtrFloat64(float64(1.0)) ``` -------------------------------- ### Utility Function to Get Pointer to String Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Shows how to use the PtrString utility function to obtain a pointer to a string value. This is useful when dealing with pointer-based struct members. ```go ptrString := client.PtrString("some string") ``` -------------------------------- ### Utility Function to Get Pointer to Boolean Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Illustrates the usage of the PtrBool utility function for creating a pointer to a boolean value. This is helpful for pointer-based struct fields. ```go ptrBool := client.PtrBool(true) ``` -------------------------------- ### Initialize and Use Databases for Testing Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Initialize databases once for faster iteration. Set environment variables to point to your database instances. ```bash make test-resetdb export TEST_DATABASE_MYSQL='mysql://root:secret@(127.0.0.1:3444)/mysql?parseTime=true' export TEST_DATABASE_POSTGRESQL='postgres://postgres:secret@127.0.0.1:3445/kratos?sslmode=disable' export TEST_DATABASE_COCKROACHDB='cockroach://root@127.0.0.1:3446/defaultdb?sslmode=disable' ``` ```bash go test ./... # or in a module: cd client go test . ``` -------------------------------- ### View Command Line Documentation Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Run this command to see all available commands and flags for the Ory Kratos CLI. ```bash kratos -h ``` ```bash kratos help ``` -------------------------------- ### Preview API Documentation Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Commands to update the SDK and OpenAPI specification, then run preview servers for API and Swagger documentation. ```make make sdk ``` ```make make docs/api ``` ```make make docs/swagger ``` -------------------------------- ### Select Server Configuration by Index Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Configure the API client to use a specific server URL from the defined configurations by setting the server index in the context. ```go ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1) ``` -------------------------------- ### Hydra Client Help Options Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-client.md Displays help information for the 'hydra client' command. Use this to see available flags and subcommands. ```bash hydra client --help ``` -------------------------------- ### API Key Authentication with Ory Access Token Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Demonstrates how to set up API key authentication using an Ory Access Token for API requests. The API key needs to be included in the Authorization header. ```go auth := context.WithValue( context.Background(), client.ContextAPIKeys, map[string]client.APIKey{ "oryAccessToken": {Key: "API_KEY_STRING"}, }, ) r, err := client.Service.Operation(auth, args) ``` -------------------------------- ### Help option for hydra serve Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-serve.md Access help information for the 'hydra serve' command to understand available options and their usage. ```bash hydra serve --help ``` -------------------------------- ### Build Development Docker Image Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Create a Docker image for development purposes using the provided make command. ```make make docker ``` -------------------------------- ### Format Code with Make Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Execute this command to format all code according to project standards. The CI pipeline enforces this formatting. ```make make format ``` -------------------------------- ### Import Go API Client Package Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Import the generated Go API client package into your project. ```go import client "github.com/ory/client-go" ``` -------------------------------- ### FrontendAPI - CreateBrowserSettingsFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a settings flow for browser-based clients. ```APIDOC ## CreateBrowserSettingsFlow ### Description Create Settings Flow for Browsers ### Method GET ### Endpoint /self-service/settings/browser ``` -------------------------------- ### FrontendAPI - GetSettingsFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves an existing settings flow. ```APIDOC ## GetSettingsFlow ### Description Get Settings Flow ### Method GET ### Endpoint /self-service/settings/flows ``` -------------------------------- ### Utility Functions for Creating Pointers Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Provides utility functions to easily obtain pointers to basic data types. These are useful because model structure members are all pointers. ```go *PtrBool(true) *PtrInt(1) *PtrInt32(1) *PtrInt64(1) *PtrFloat(1.0) *PtrFloat32(1.0) *PtrFloat64(1.0) *PtrString("string") *PtrTime(time.Now()) ``` -------------------------------- ### FrontendAPI - CreateBrowserRegistrationFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a registration flow for browser-based clients. ```APIDOC ## CreateBrowserRegistrationFlow ### Description Create Registration Flow for Browsers ### Method GET ### Endpoint /self-service/registration/browser ``` -------------------------------- ### Run Short Tests Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Execute short tests that do not require a SQL database. These tests use SQLite and run quickly. ```bash go test -short ./... ``` ```bash cd client go test -short . ``` -------------------------------- ### Parse Pagination and Calculate Indices in Go Source: https://github.com/ory/kratos/blob/master/oryx/pagination/README.md Demonstrates how to parse pagination parameters from an HTTP request and calculate slice bounds. It uses the pagination.Parse function to extract limit and offset, and pagination.Index to determine the slice range for a given dataset. ```go package main import ( "github.com/ory/pagination" "net/http" "net/url" "fmt" ) func main() { u, _ := url.Parse("http://localhost/foo?offset=0&limit=10") limit, offset := pagination.Parse(&http.Request{URL: u}, 5, 5, 10) items := []string{"a", "b", "c", "d"} start, end := pagination.Index(limit, offset, len(items)) fmt.Printf("Got items: %v", items[start:end]) } ``` -------------------------------- ### FrontendAPI - CreateNativeSettingsFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a settings flow for native applications. ```APIDOC ## CreateNativeSettingsFlow ### Description Create Settings Flow for Native Apps ### Method GET ### Endpoint /self-service/settings/api ``` -------------------------------- ### Run Project Tests Source: https://github.com/ory/kratos/blob/master/CONTRIBUTING.md Execute the full project test suite to ensure all tests pass before submitting a pull request. This command verifies the integrity of your changes. ```bash go test ./... ``` -------------------------------- ### FrontendAPI - CreateNativeRegistrationFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a registration flow for native applications. ```APIDOC ## CreateNativeRegistrationFlow ### Description Create Registration Flow for Native Apps ### Method GET ### Endpoint /self-service/registration/api ``` -------------------------------- ### Configure Templated Server URL Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Set custom variables for a templated server URL using a map in the context. This allows dynamic configuration of the base path. ```go ctx := context.WithValue(context.Background(), client.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` -------------------------------- ### Generate SQL Migrations using Soda CLI Source: https://github.com/ory/kratos/blob/master/persistence/sql/README.md This legacy method uses the soda CLI to generate migration files for specific database dialects. After generation, developers are expected to manually consolidate the files to ensure cross-database compatibility. ```bash dialect=mysql name=migration_name ory dev pop migration create -d=$dialect ./persistence/sql/migrations/templates $name soda generate sql -e mysql -c ./persistence/sql/.soda.yml -p ./persistence/sql/migrations/templates $name soda generate sql -e sqlite -c ./persistence/sql/.soda.yml -p ./persistence/sql/migrations/templates $name soda generate sql -e postgres -c ./persistence/sql/.soda.yml -p ./persistence/sql/migrations/templates $name soda generate sql -e cockroach -c ./persistence/sql/.soda.yml -p ./persistence/sql/migrations/templates $name ``` -------------------------------- ### FrontendAPI: UpdateSettingsFlow Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Completes the settings flow for a user. ```APIDOC ## UpdateSettingsFlow ### Description Completes the settings flow. ### Method POST ### Endpoint /self-service/settings ``` -------------------------------- ### Serve Command Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-serve.md This section details the 'hydra serve' command used for managing the server. It includes synopsis, options, and related commands. ```APIDOC ## hydra serve ### Description Manage the server ### Synopsis ``` hydra serve [flags] ``` ### Options ``` -h, --help help for serve ``` ### See also * [hydra](hydra) ``` -------------------------------- ### Configure HTTP Proxy for Go API Client Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Set the HTTP_PROXY environment variable to route API requests through a proxy server. ```go os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") ``` -------------------------------- ### FrontendAPI - CreateBrowserVerificationFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a verification flow for browser-based clients. ```APIDOC ## CreateBrowserVerificationFlow ### Description Create Verification Flow for Browser Clients ### Method GET ### Endpoint /self-service/verification/browser ``` -------------------------------- ### Run Hydra Client Commands Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-client.md Use this command to manage OAuth2 clients. It serves as a base for subcommands like 'admin' and 'public'. ```bash hydra client [flags] ``` -------------------------------- ### FrontendAPI - CreateNativeVerificationFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a verification flow for native applications. ```APIDOC ## CreateNativeVerificationFlow ### Description Create Verification Flow for Native Apps ### Method GET ### Endpoint /self-service/verification/api ``` -------------------------------- ### Hydra CLI Usage Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra.md This snippet shows the basic command structure for the Hydra CLI. It outlines the main command and available global flags. ```bash hydra [flags] ``` -------------------------------- ### FrontendAPI - CreateBrowserRecoveryFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a recovery flow for browser-based clients. ```APIDOC ## CreateBrowserRecoveryFlow ### Description Create Recovery Flow for Browsers ### Method GET ### Endpoint /self-service/recovery/browser ``` -------------------------------- ### Run End-to-End Tests Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Execute end-to-end tests using Cypress. Use the --dev flag for development mode with SQLite, or make test-e2e for all tests with databases. ```bash ./test/e2e/run.sh --dev sqlite ``` ```make make test-e2e ``` ```bash ./test/e2e/run.sh ``` -------------------------------- ### FrontendAPI - CreateBrowserLoginFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a login flow for browser-based clients. ```APIDOC ## CreateBrowserLoginFlow ### Description Create Login Flow for Browsers ### Method GET ### Endpoint /self-service/login/browser ``` -------------------------------- ### List JSON Schema Paths with Go Source: https://github.com/ory/kratos/blob/master/oryx/jsonschemax/README.md This Go code snippet demonstrates how to use the `jsonschemax.ListPaths` function to retrieve all possible JSON paths from a given JSON Schema. It requires the `ory/jsonschema/v3` and `ory/x/jsonschemax` packages. The function takes the schema resource name and a compiler instance as input, returning a list of path objects. ```go package main import ( "bytes" "fmt" "github.com/ory/jsonschema/v3" "github.com/ory/x/jsonschemax" ) var schema = "..." func main() { c := jsonschema.NewCompiler() _ = c.AddResource("test.json", bytes.NewBufferString(schema)) paths, _ := jsonschemax.ListPaths("test.json", c) fmt.Printf("%+v", paths) } ``` -------------------------------- ### FrontendAPI - GetRegistrationFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves an existing registration flow. ```APIDOC ## GetRegistrationFlow ### Description Get Registration Flow ### Method GET ### Endpoint /self-service/registration/flows ``` -------------------------------- ### FrontendAPI - CreateNativeRecoveryFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a recovery flow for native applications. ```APIDOC ## CreateNativeRecoveryFlow ### Description Create Recovery Flow for Native Apps ### Method GET ### Endpoint /self-service/recovery/api ``` -------------------------------- ### MetadataAPI: GetVersion Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves the current running version of the Ory Kratos software. ```APIDOC ## GetVersion ### Description Return Running Software Version. ### Method GET ### Endpoint /version ``` -------------------------------- ### FrontendAPI - CreateNativeLoginFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Initiates a login flow for native applications. ```APIDOC ## CreateNativeLoginFlow ### Description Create Login Flow for Native Apps ### Method GET ### Endpoint /self-service/login/api ``` -------------------------------- ### MetadataAPI: IsReady Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Checks the health status of both the HTTP server and the database. ```APIDOC ## IsReady ### Description Check HTTP Server and Database Status. ### Method GET ### Endpoint /health/ready ``` -------------------------------- ### Hydra CLI Help Option Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra.md This snippet displays the help flag for the Hydra CLI, which provides information about available commands and options. ```bash hydra help -h, --help help for hydra ``` -------------------------------- ### FrontendAPI - CreateFedcmFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves parameters for FedCM (Federated Credential Management). ```APIDOC ## CreateFedcmFlow ### Description Get FedCM Parameters ### Method GET ### Endpoint /self-service/fed-cm/parameters ``` -------------------------------- ### FrontendAPI - GetVerificationFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves an existing verification flow. ```APIDOC ## GetVerificationFlow ### Description Get Verification Flow ### Method GET ### Endpoint /self-service/verification/flows ``` -------------------------------- ### IdentityAPI: CreateIdentity Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Creates a new identity within the system. ```APIDOC ## CreateIdentity ### Description Creates an Identity. ### Method POST ### Endpoint /admin/identities ``` -------------------------------- ### Utility Methods for Pointers Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Provides utility functions to easily obtain pointers to values of basic types, useful when working with model structure members that are pointers. ```APIDOC ## Utility Methods Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it: * `PtrBool` * `PtrInt` * `PtrInt32` * `PtrInt64` * `PtrFloat` * `PtrFloat32` * `PtrFloat64` * `PtrString` * `PtrTime` ``` -------------------------------- ### Utility Methods for Pointer Types Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Utility functions to easily obtain pointers to values of basic types. ```APIDOC ## Documentation for Utility Methods Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it: * `PtrBool` * `PtrInt` * `PtrInt32` * `PtrInt64` * `PtrFloat` * `PtrFloat32` * `PtrFloat64` * `PtrString` * `PtrTime` ``` -------------------------------- ### FrontendAPI: UpdateVerificationFlow Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Completes the verification flow for a user. ```APIDOC ## UpdateVerificationFlow ### Description Completes the verification flow. ### Method POST ### Endpoint /self-service/verification ``` -------------------------------- ### FrontendAPI - GetWebAuthnJavaScript Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves the WebAuthn JavaScript file. ```APIDOC ## GetWebAuthnJavaScript ### Description Get WebAuthn JavaScript ### Method GET ### Endpoint /.well-known/ory/webauthn.js ``` -------------------------------- ### Update Test Snapshots Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Update snapshot fixtures for tests. Use the specific command for short tests or the general command for all tests. ```bash make test-update-snapshots ``` ```bash UPDATE_SNAPSHOTS=true go test -p 4 ./... ``` -------------------------------- ### Hydra Client Public Subcommand Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-client.md Access public-facing functions related to OAuth2 clients. This subcommand is typically used for client registration or discovery. ```bash hydra client public ``` -------------------------------- ### Configure Cypress Test Subset Source: https://github.com/ory/kratos/blob/master/DEVELOP.md Modify the cypress.json file to specify a subset of end-to-end tests to run by adding the 'testFiles' option. ```json "testFiles": ["profiles/network/*"] ``` -------------------------------- ### MetadataAPI: IsAlive Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Checks the health status of the HTTP server. ```APIDOC ## IsAlive ### Description Check HTTP Server Status. ### Method GET ### Endpoint /health/alive ``` -------------------------------- ### FrontendAPI - GetLoginFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves an existing login flow. ```APIDOC ## GetLoginFlow ### Description Get Login Flow ### Method GET ### Endpoint /self-service/login/flows ``` -------------------------------- ### FrontendAPI - UpdateFedcmFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Submits a FedCM token for processing. ```APIDOC ## UpdateFedcmFlow ### Description Submit a FedCM token ### Method POST ### Endpoint /self-service/fed-cm/token ``` -------------------------------- ### FrontendAPI - UpdateLoginFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Submits data to complete a login flow. ```APIDOC ## UpdateLoginFlow ### Description Submit a Login Flow ### Method POST ### Endpoint /self-service/login ``` -------------------------------- ### Authentication Schemes Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Details the authentication scheme for the API using API keys passed in the Authorization header. ```APIDOC ## Authentication Schemes ### oryAccessToken - **Type**: API key - **API key parameter name**: Authorization - **Location**: HTTP header Note, each API key must be added to a map of `map[string]APIKey` where the key is: oryAccessToken and passed in as the auth context for each request. Example ```go auth := context.WithValue( context.Background(), client.ContextAPIKeys, map[string]client.APIKey{ "oryAccessToken": {Key: "API_KEY_STRING"}, }, ) r, err := client.Service.Operation(auth, args) ``` ``` -------------------------------- ### Authentication Scheme: oryAccessToken Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Details on how to authenticate requests using the oryAccessToken API key. ```APIDOC ## Authentication Scheme: oryAccessToken ### Description Authentication schemes defined for the API: - **Type**: API key - **API key parameter name**: Authorization - **Location**: HTTP header Note, each API key must be added to a map of `map[string]APIKey` where the key is: oryAccessToken and passed in as the auth context for each request. ### Example ```go auth := context.WithValue( context.Background(), client.ContextAPIKeys, map[string]client.APIKey{ "oryAccessToken": {Key: "API_KEY_STRING"}, }, ) r, err := client.Service.Operation(auth, args) ``` ``` -------------------------------- ### FrontendAPI - ListMySessions Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Lists all active sessions for the current user. ```APIDOC ## ListMySessions ### Description Get My Active Sessions ### Method GET ### Endpoint /sessions ``` -------------------------------- ### FrontendAPI - GetRecoveryFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves an existing recovery flow. ```APIDOC ## GetRecoveryFlow ### Description Get Recovery Flow ### Method GET ### Endpoint /self-service/recovery/flows ``` -------------------------------- ### FrontendAPI: UpdateRegistrationFlow Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Submits registration flow information to the API. ```APIDOC ## UpdateRegistrationFlow ### Description Updates the registration flow. ### Method POST ### Endpoint /self-service/registration ``` -------------------------------- ### Hydra Client Admin Subcommand Source: https://github.com/ory/kratos/blob/master/oryx/clidoc/testdata/hydra-client.md Access administrative functions for OAuth2 clients. This subcommand is used for managing clients programmatically. ```bash hydra client admin ``` -------------------------------- ### FrontendAPI - CreateBrowserLogoutFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Generates a logout URL for browser-based clients. ```APIDOC ## CreateBrowserLogoutFlow ### Description Create a Logout URL for Browsers ### Method GET ### Endpoint /self-service/logout/browser ``` -------------------------------- ### MetadataAPI Endpoints Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Endpoints for retrieving system version and health status. ```APIDOC ## GET /version ### Description Returns the running software version. ### Method GET ### Endpoint /version ## GET /health/alive ### Description Checks the HTTP Server Status. ### Method GET ### Endpoint /health/alive ## GET /health/ready ### Description Checks the HTTP Server and Database Status. ### Method GET ### Endpoint /health/ready ``` -------------------------------- ### IdentityAPI: CreateTestLoginFlow Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Creates a test login flow for an identity, useful for testing authentication mechanisms. ```APIDOC ## CreateTestLoginFlow ### Description Creates a test OIDC login flow. ### Method POST ### Endpoint /admin/test-login-flows ``` -------------------------------- ### IdentityAPI: ListIdentities Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves a list of all identities within the system. ```APIDOC ## ListIdentities ### Description Lists Identities. ### Method GET ### Endpoint /admin/identities ``` -------------------------------- ### IdentityAPI: CreateRecoveryLinkForIdentity Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Generates a recovery link for a specific identity. ```APIDOC ## CreateRecoveryLinkForIdentity ### Description Creates a Recovery Link for an Identity. ### Method POST ### Endpoint /admin/recovery/link ``` -------------------------------- ### FrontendAPI - ExchangeSessionToken Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Exchanges a session token for session details. ```APIDOC ## ExchangeSessionToken ### Description Exchange Session Token ### Method GET ### Endpoint /sessions/token-exchange ``` -------------------------------- ### FrontendAPI - PerformNativeLogout Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Performs a logout operation for native applications. ```APIDOC ## PerformNativeLogout ### Description Perform Logout for Native Apps ### Method DELETE ### Endpoint /self-service/logout/api ``` -------------------------------- ### FrontendAPI: UpdateRecoveryFlow Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Submits recovery flow information to the API. ```APIDOC ## UpdateRecoveryFlow ### Description Updates the recovery flow. ### Method POST ### Endpoint /self-service/recovery ``` -------------------------------- ### IdentityAPI: ManageSessions Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Manages user sessions in bulk, potentially for batch operations like invalidation or updates. ```APIDOC ## ManageSessions ### Description Manages sessions in bulk. ### Method POST ### Endpoint /admin/sessions ``` -------------------------------- ### IdentityAPI: BatchPatchIdentities Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Applies a batch of patches to multiple identities. ```APIDOC ## BatchPatchIdentities ### Description Creates multiple identities using batch patching. ### Method PATCH ### Endpoint /admin/identities ``` -------------------------------- ### FrontendAPI - ToSession Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Checks the identity of the current HTTP session. ```APIDOC ## ToSession ### Description Check Who the Current HTTP Session Belongs To ### Method GET ### Endpoint /sessions/whoami ``` -------------------------------- ### IdentityAPI: ListSessions Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves a list of all active user sessions. ```APIDOC ## ListSessions ### Description Lists All Sessions. ### Method GET ### Endpoint /admin/sessions ``` -------------------------------- ### IdentityAPI: ListIdentitySchemas Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves a list of all available identity schema definitions. ```APIDOC ## ListIdentitySchemas ### Description Gets all Identity Schemas. ### Method GET ### Endpoint /schemas ``` -------------------------------- ### IdentityAPI: CreateRecoveryCodeForIdentity Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Generates a recovery code for a specific identity. ```APIDOC ## CreateRecoveryCodeForIdentity ### Description Creates a Recovery Code for an Identity. ### Method POST ### Endpoint /admin/recovery/code ``` -------------------------------- ### FrontendAPI: UpdateLogoutFlow Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Initiates or updates the logout flow for a user. ```APIDOC ## UpdateLogoutFlow ### Description Updates the logout flow. ### Method GET ### Endpoint /self-service/logout ``` -------------------------------- ### FrontendAPI - GetFlowError Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves errors associated with a user flow. ```APIDOC ## GetFlowError ### Description Get User-Flow Errors ### Method GET ### Endpoint /self-service/errors ``` -------------------------------- ### IdentityAPI Endpoints Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Endpoints for managing identities, including creation, deletion, retrieval, and session management. ```APIDOC ## PATCH /admin/identities ### Description Creates multiple identities in a batch. ### Method PATCH ### Endpoint /admin/identities ## POST /admin/identities ### Description Creates an Identity. ### Method POST ### Endpoint /admin/identities ## POST /admin/recovery/code ### Description Creates a Recovery Code for an Identity. ### Method POST ### Endpoint /admin/recovery/code ## POST /admin/recovery/link ### Description Creates a Recovery Link for an Identity. ### Method POST ### Endpoint /admin/recovery/link ## POST /admin/test-login-flows ### Description Creates a test OIDC login flow. ### Method POST ### Endpoint /admin/test-login-flows ## DELETE /admin/identities/{id} ### Description Deletes an Identity. ### Method DELETE ### Endpoint /admin/identities/{id} ## DELETE /admin/identities/{id}/credentials/{type} ### Description Deletes a credential for a specific identity. ### Method DELETE ### Endpoint /admin/identities/{id}/credentials/{type} ## DELETE /admin/identities/{id}/sessions ### Description Deletes and invalidates an Identity's Sessions. ### Method DELETE ### Endpoint /admin/identities/{id}/sessions ## DELETE /admin/sessions/{id} ### Description Deactivates a Session. ### Method DELETE ### Endpoint /admin/sessions/{id} ## PATCH /admin/sessions/{id}/extend ### Description Extends a Session. ### Method PATCH ### Endpoint /admin/sessions/{id}/extend ## GET /admin/identities/{id} ### Description Gets an Identity. ### Method GET ### Endpoint /admin/identities/{id} ## GET /admin/identities/by/external/{externalID} ### Description Gets an Identity by its External ID. ### Method GET ### Endpoint /admin/identities/by/external/{externalID} ## GET /schemas/{id} ### Description Gets an Identity JSON Schema. ### Method GET ### Endpoint /schemas/{id} ## GET /admin/sessions/{id} ### Description Gets a Session. ### Method GET ### Endpoint /admin/sessions/{id} ## GET /admin/identities ### Description Lists Identities. ### Method GET ### Endpoint /admin/identities ## GET /schemas ### Description Gets all Identity Schemas. ### Method GET ### Endpoint /schemas ## GET /admin/identities/{id}/sessions ### Description Lists an Identity's Sessions. ### Method GET ### Endpoint /admin/identities/{id}/sessions ## GET /admin/sessions ### Description Lists All Sessions. ### Method GET ### Endpoint /admin/sessions ## POST /admin/sessions ### Description Manages sessions in bulk. ### Method POST ### Endpoint /admin/sessions ## PATCH /admin/identities/{id} ### Description Patches an Identity. ### Method PATCH ### Endpoint /admin/identities/{id} ## PUT /admin/identities/{id} ### Description Updates an Identity. ### Method PUT ### Endpoint /admin/identities/{id} ``` -------------------------------- ### IdentityAPI: GetSession Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves details of a specific user session. ```APIDOC ## GetSession ### Description Gets Session. ### Method GET ### Endpoint /admin/sessions/{id} ``` -------------------------------- ### IdentityAPI: ExtendSession Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Extends the validity period of an active user session. ```APIDOC ## ExtendSession ### Description Extends a Session. ### Method PATCH ### Endpoint /admin/sessions/{id}/extend ``` -------------------------------- ### IdentityAPI: GetIdentity Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves detailed information about a specific identity. ```APIDOC ## GetIdentity ### Description Gets an Identity. ### Method GET ### Endpoint /admin/identities/{id} ``` -------------------------------- ### IdentityAPI: ListIdentitySessions Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves a list of all sessions associated with a specific identity. ```APIDOC ## ListIdentitySessions ### Description Lists an Identity's Sessions. ### Method GET ### Endpoint /admin/identities/{id}/sessions ``` -------------------------------- ### FrontendAPI - GetWellKnownChangePassword Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves the URL for changing a password. ```APIDOC ## GetWellKnownChangePassword ### Description Change Password URL ### Method GET ### Endpoint /.well-known/change-password ``` -------------------------------- ### IdentityAPI: PatchIdentity Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Applies a patch to an existing identity to modify its properties. ```APIDOC ## PatchIdentity ### Description Patches an Identity. ### Method PATCH ### Endpoint /admin/identities/{id} ``` -------------------------------- ### FrontendAPI Endpoints Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Endpoints related to user-facing flows such as logout, recovery, registration, settings, and verification. ```APIDOC ## GET /self-service/logout ### Description Updates the logout flow. ### Method GET ### Endpoint /self-service/logout ## POST /self-service/recovery ### Description Updates the recovery flow. ### Method POST ### Endpoint /self-service/recovery ## POST /self-service/registration ### Description Updates the registration flow. ### Method POST ### Endpoint /self-service/registration ## POST /self-service/settings ### Description Completes the settings flow. ### Method POST ### Endpoint /self-service/settings ## POST /self-service/verification ### Description Completes the verification flow. ### Method POST ### Endpoint /self-service/verification ``` -------------------------------- ### FrontendAPI - DisableMyOtherSessions Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Disables all user sessions except the current one. ```APIDOC ## DisableMyOtherSessions ### Description Disable my other sessions ### Method DELETE ### Endpoint /sessions ``` -------------------------------- ### CourierAPI - ListCourierMessages Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Lists all messages managed by the courier service. ```APIDOC ## ListCourierMessages ### Description List Messages ### Method GET ### Endpoint /admin/courier/messages ``` -------------------------------- ### IdentityAPI: UpdateIdentity Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Updates an existing identity with new information. ```APIDOC ## UpdateIdentity ### Description Updates an Identity. ### Method PUT ### Endpoint /admin/identities/{id} ``` -------------------------------- ### IdentityAPI: GetIdentitySchema Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves a specific identity schema definition. ```APIDOC ## GetIdentitySchema ### Description Gets Identity JSON Schema. ### Method GET ### Endpoint /schemas/{id} ``` -------------------------------- ### IdentityAPI: DeleteIdentity Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Deletes an identity from the system based on its ID. ```APIDOC ## DeleteIdentity ### Description Deletes an Identity. ### Method DELETE ### Endpoint /admin/identities/{id} ``` -------------------------------- ### IdentityAPI: GetIdentityByExternalID Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Retrieves an identity using its external identifier. ```APIDOC ## GetIdentityByExternalID ### Description Gets an Identity by its External ID. ### Method GET ### Endpoint /admin/identities/by/external/{externalID} ``` -------------------------------- ### FrontendAPI - DisableMySession Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Disables a specific user session. ```APIDOC ## DisableMySession ### Description Disable one of my sessions ### Method DELETE ### Endpoint /sessions/{id} ``` -------------------------------- ### FrontendAPI - DeleteTestLoginFlow Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Deletes a test OIDC login flow. ```APIDOC ## DeleteTestLoginFlow ### Description Delete a test OIDC login flow ### Method DELETE ### Endpoint /self-service/login/test ``` -------------------------------- ### CourierAPI - GetCourierMessage Source: https://github.com/ory/kratos/blob/master/pkg/httpclient/README.md Retrieves a specific message from the courier service. ```APIDOC ## GetCourierMessage ### Description Get a Message ### Method GET ### Endpoint /admin/courier/messages/{id} ``` -------------------------------- ### IdentityAPI: DeleteIdentitySessions Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Deletes and invalidates all sessions for a given identity. ```APIDOC ## DeleteIdentitySessions ### Description Deletes & Invalidates an Identity's Sessions. ### Method DELETE ### Endpoint /admin/identities/{id}/sessions ``` -------------------------------- ### IdentityAPI: DisableSession Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Deactivates a specific user session. ```APIDOC ## DisableSession ### Description Deactivates a Session. ### Method DELETE ### Endpoint /admin/sessions/{id} ``` -------------------------------- ### IdentityAPI: DeleteIdentityCredentials Source: https://github.com/ory/kratos/blob/master/pkg/client-go/README.md Removes specific credentials for an identity. ```APIDOC ## DeleteIdentityCredentials ### Description Deletes a credential for a specific identity. ### Method DELETE ### Endpoint /admin/identities/{id}/credentials/{type} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.