Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

ory/kratos-client-php

Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.

Installation & Usage

Requirements

PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/ory/kratos-client-php.git"
    }
  ],
  "require": {
    "ory/kratos-client-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/ory/kratos-client-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new Ory\Kratos\Client\Api\MetadataApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->getVersion();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MetadataApi->getVersion: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
MetadataApi getVersion GET /version Return Running Software Version.
MetadataApi isAlive GET /health/alive Check HTTP Server Status
MetadataApi isReady GET /health/ready Check HTTP Server and Database Status
V0alpha2Api adminCreateIdentity POST /identities Create an Identity
V0alpha2Api adminCreateSelfServiceRecoveryLink POST /recovery/link Create a Recovery Link
V0alpha2Api adminDeleteIdentity DELETE /identities/{id} Delete an Identity
V0alpha2Api adminDeleteIdentitySessions DELETE /identities/{id}/sessions Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
V0alpha2Api adminGetIdentity GET /identities/{id} Get an Identity
V0alpha2Api adminListIdentities GET /identities List Identities
V0alpha2Api adminUpdateIdentity PUT /identities/{id} Update an Identity
V0alpha2Api createSelfServiceLogoutFlowUrlForBrowsers GET /self-service/logout/browser Create a Logout URL for Browsers
V0alpha2Api getJsonSchema GET /schemas/{id}
V0alpha2Api getSelfServiceError GET /self-service/errors Get Self-Service Errors
V0alpha2Api getSelfServiceLoginFlow GET /self-service/login/flows Get Login Flow
V0alpha2Api getSelfServiceRecoveryFlow GET /self-service/recovery/flows Get Recovery Flow
V0alpha2Api getSelfServiceRegistrationFlow GET /self-service/registration/flows Get Registration Flow
V0alpha2Api getSelfServiceSettingsFlow GET /self-service/settings/flows Get Settings Flow
V0alpha2Api getSelfServiceVerificationFlow GET /self-service/verification/flows Get Verification Flow
V0alpha2Api getWebAuthnJavaScript GET /.well-known/ory/webauthn.js Get WebAuthn JavaScript
V0alpha2Api initializeSelfServiceLoginFlowForBrowsers GET /self-service/login/browser Initialize Login Flow for Browsers
V0alpha2Api initializeSelfServiceLoginFlowWithoutBrowser GET /self-service/login/api Initialize Login Flow for APIs, Services, Apps, ...
V0alpha2Api initializeSelfServiceRecoveryFlowForBrowsers GET /self-service/recovery/browser Initialize Recovery Flow for Browsers
V0alpha2Api initializeSelfServiceRecoveryFlowWithoutBrowser GET /self-service/recovery/api Initialize Recovery Flow for APIs, Services, Apps, ...
V0alpha2Api initializeSelfServiceRegistrationFlowForBrowsers GET /self-service/registration/browser Initialize Registration Flow for Browsers
V0alpha2Api initializeSelfServiceRegistrationFlowWithoutBrowser GET /self-service/registration/api Initialize Registration Flow for APIs, Services, Apps, ...
V0alpha2Api initializeSelfServiceSettingsFlowForBrowsers GET /self-service/settings/browser Initialize Settings Flow for Browsers
V0alpha2Api initializeSelfServiceSettingsFlowWithoutBrowser GET /self-service/settings/api Initialize Settings Flow for APIs, Services, Apps, ...
V0alpha2Api initializeSelfServiceVerificationFlowForBrowsers GET /self-service/verification/browser Initialize Verification Flow for Browser Clients
V0alpha2Api initializeSelfServiceVerificationFlowWithoutBrowser GET /self-service/verification/api Initialize Verification Flow for APIs, Services, Apps, ...
V0alpha2Api listIdentitySchemas GET /schemas
V0alpha2Api submitSelfServiceLoginFlow POST /self-service/login Submit a Login Flow
V0alpha2Api submitSelfServiceLogoutFlow GET /self-service/logout Complete Self-Service Logout
V0alpha2Api submitSelfServiceLogoutFlowWithoutBrowser DELETE /self-service/logout/api Perform Logout for APIs, Services, Apps, ...
V0alpha2Api submitSelfServiceRecoveryFlow POST /self-service/recovery Complete Recovery Flow
V0alpha2Api submitSelfServiceRegistrationFlow POST /self-service/registration Submit a Registration Flow
V0alpha2Api submitSelfServiceSettingsFlow POST /self-service/settings Complete Settings Flow
V0alpha2Api submitSelfServiceVerificationFlow POST /self-service/verification Complete Verification Flow
V0alpha2Api toSession GET /sessions/whoami Check Who the Current HTTP Session Belongs To

Models

Authorization

oryAccessToken

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

hi@ory.sh

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v0.8.2-alpha.1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages