{-
   ORY Hydra

   Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.

   OpenAPI Version: 3.0.1
   ORY Hydra API version: latest
   Generated by OpenAPI Generator (https://openapi-generator.tech)
-}

{-|
Module : ORYHydra.API.Admin
-}

{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MonoLocalBinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}

module ORYHydra.API.Admin where

import ORYHydra.Core
import ORYHydra.MimeTypes
import ORYHydra.Model as M

import qualified Data.Aeson as A
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
import qualified Data.Foldable as P
import qualified Data.Map as Map
import qualified Data.Maybe as P
import qualified Data.Proxy as P (Proxy(..))
import qualified Data.Set as Set
import qualified Data.String as P
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TL
import qualified Data.Time as TI
import qualified Network.HTTP.Client.MultipartFormData as NH
import qualified Network.HTTP.Media as ME
import qualified Network.HTTP.Types as NH
import qualified Web.FormUrlEncoded as WH
import qualified Web.HttpApiData as WH

import Data.Text (Text)
import GHC.Base ((<|>))

import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
import qualified Prelude as P

-- * Operations


-- ** Admin

-- *** acceptConsentRequest0

-- | @PUT \/oauth2\/auth\/requests\/consent\/accept@
-- 
-- Accept a Consent Request
-- 
-- When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.  The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\").  The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.  This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
-- 
acceptConsentRequest0
  :: (Consumes AcceptConsentRequest0 MimeJSON)
  => ConsentChallenge -- ^ "consentChallenge"
  -> ORYHydraRequest AcceptConsentRequest0 MimeJSON CompletedRequest MimeJSON
acceptConsentRequest0 :: ConsentChallenge
-> ORYHydraRequest
     AcceptConsentRequest0 MimeJSON CompletedRequest MimeJSON
acceptConsentRequest0 (ConsentChallenge Text
consentChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     AcceptConsentRequest0 MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/oauth2/auth/requests/consent/accept"]
    ORYHydraRequest
  AcceptConsentRequest0 MimeJSON CompletedRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     AcceptConsentRequest0 MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"consent_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
consentChallenge)

data AcceptConsentRequest0 
instance HasBodyParam AcceptConsentRequest0 AcceptConsentRequest 

-- | @application/json@
instance Consumes AcceptConsentRequest0 MimeJSON

-- | @application/json@
instance Produces AcceptConsentRequest0 MimeJSON


-- *** acceptLoginRequest0

-- | @PUT \/oauth2\/auth\/requests\/login\/accept@
-- 
-- Accept a Login Request
-- 
-- When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\").  The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie.  The response contains a redirect URL which the login provider should redirect the user-agent to.
-- 
acceptLoginRequest0
  :: (Consumes AcceptLoginRequest0 MimeJSON)
  => LoginChallenge -- ^ "loginChallenge"
  -> ORYHydraRequest AcceptLoginRequest0 MimeJSON CompletedRequest MimeJSON
acceptLoginRequest0 :: LoginChallenge
-> ORYHydraRequest
     AcceptLoginRequest0 MimeJSON CompletedRequest MimeJSON
acceptLoginRequest0 (LoginChallenge Text
loginChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     AcceptLoginRequest0 MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/oauth2/auth/requests/login/accept"]
    ORYHydraRequest
  AcceptLoginRequest0 MimeJSON CompletedRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     AcceptLoginRequest0 MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"login_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
loginChallenge)

data AcceptLoginRequest0 
instance HasBodyParam AcceptLoginRequest0 AcceptLoginRequest 

-- | @application/json@
instance Consumes AcceptLoginRequest0 MimeJSON

-- | @application/json@
instance Produces AcceptLoginRequest0 MimeJSON


-- *** acceptLogoutRequest

-- | @PUT \/oauth2\/auth\/requests\/logout\/accept@
-- 
-- Accept a Logout Request
-- 
-- When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
-- 
acceptLogoutRequest
  :: LogoutChallenge -- ^ "logoutChallenge"
  -> ORYHydraRequest AcceptLogoutRequest MimeNoContent CompletedRequest MimeJSON
acceptLogoutRequest :: LogoutChallenge
-> ORYHydraRequest
     AcceptLogoutRequest MimeNoContent CompletedRequest MimeJSON
acceptLogoutRequest (LogoutChallenge Text
logoutChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     AcceptLogoutRequest MimeNoContent CompletedRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/oauth2/auth/requests/logout/accept"]
    ORYHydraRequest
  AcceptLogoutRequest MimeNoContent CompletedRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     AcceptLogoutRequest MimeNoContent CompletedRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"logout_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
logoutChallenge)

data AcceptLogoutRequest  
-- | @application/json@
instance Produces AcceptLogoutRequest MimeJSON


-- *** createJsonWebKeySet

-- | @POST \/keys\/{set}@
-- 
-- Generate a New JSON Web Key
-- 
-- This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
-- 
createJsonWebKeySet
  :: (Consumes CreateJsonWebKeySet MimeJSON)
  => Set -- ^ "set" -  The set
  -> ORYHydraRequest CreateJsonWebKeySet MimeJSON JSONWebKeySet MimeJSON
createJsonWebKeySet :: Set
-> ORYHydraRequest
     CreateJsonWebKeySet MimeJSON JSONWebKeySet MimeJSON
createJsonWebKeySet (Set Text
set) =
  Method
-> [ByteString]
-> ORYHydraRequest
     CreateJsonWebKeySet MimeJSON JSONWebKeySet MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/keys/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
set]

data CreateJsonWebKeySet 
instance HasBodyParam CreateJsonWebKeySet JsonWebKeySetGeneratorRequest 

-- | @application/json@
instance Consumes CreateJsonWebKeySet MimeJSON

-- | @application/json@
instance Produces CreateJsonWebKeySet MimeJSON


-- *** createOAuth2Client

-- | @POST \/clients@
-- 
-- Create an OAuth 2.0 Client
-- 
-- Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The secret will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somwhere safe.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
-- 
createOAuth2Client
  :: (Consumes CreateOAuth2Client MimeJSON, MimeRender MimeJSON OAuth2Client)
  => OAuth2Client -- ^ "body"
  -> ORYHydraRequest CreateOAuth2Client MimeJSON OAuth2Client MimeJSON
createOAuth2Client :: OAuth2Client
-> ORYHydraRequest
     CreateOAuth2Client MimeJSON OAuth2Client MimeJSON
createOAuth2Client OAuth2Client
body =
  Method
-> [ByteString]
-> ORYHydraRequest
     CreateOAuth2Client MimeJSON OAuth2Client MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/clients"]
    ORYHydraRequest CreateOAuth2Client MimeJSON OAuth2Client MimeJSON
-> OAuth2Client
-> ORYHydraRequest
     CreateOAuth2Client MimeJSON OAuth2Client MimeJSON
forall req param contentType res accept.
(HasBodyParam req param, Consumes req contentType,
 MimeRender contentType param) =>
ORYHydraRequest req contentType res accept
-> param -> ORYHydraRequest req contentType res accept
`setBodyParam` OAuth2Client
body

data CreateOAuth2Client 
instance HasBodyParam CreateOAuth2Client OAuth2Client 

-- | @application/json@
instance Consumes CreateOAuth2Client MimeJSON

-- | @application/json@
instance Produces CreateOAuth2Client MimeJSON


-- *** deleteJsonWebKey

-- | @DELETE \/keys\/{set}\/{kid}@
-- 
-- Delete a JSON Web Key
-- 
-- Use this endpoint to delete a single JSON Web Key.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
-- 
deleteJsonWebKey
  :: Kid -- ^ "kid" -  The kid of the desired key
  -> Set -- ^ "set" -  The set
  -> ORYHydraRequest DeleteJsonWebKey MimeNoContent NoContent MimeNoContent
deleteJsonWebKey :: Kid
-> Set
-> ORYHydraRequest
     DeleteJsonWebKey MimeNoContent NoContent MimeNoContent
deleteJsonWebKey (Kid Text
kid) (Set Text
set) =
  Method
-> [ByteString]
-> ORYHydraRequest
     DeleteJsonWebKey MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/keys/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
set,ByteString
"/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
kid]

data DeleteJsonWebKey  
instance Produces DeleteJsonWebKey MimeNoContent


-- *** deleteJsonWebKeySet

-- | @DELETE \/keys\/{set}@
-- 
-- Delete a JSON Web Key Set
-- 
-- Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
-- 
deleteJsonWebKeySet
  :: Set -- ^ "set" -  The set
  -> ORYHydraRequest DeleteJsonWebKeySet MimeNoContent NoContent MimeNoContent
deleteJsonWebKeySet :: Set
-> ORYHydraRequest
     DeleteJsonWebKeySet MimeNoContent NoContent MimeNoContent
deleteJsonWebKeySet (Set Text
set) =
  Method
-> [ByteString]
-> ORYHydraRequest
     DeleteJsonWebKeySet MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/keys/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
set]

data DeleteJsonWebKeySet  
instance Produces DeleteJsonWebKeySet MimeNoContent


-- *** deleteOAuth2Client

-- | @DELETE \/clients\/{id}@
-- 
-- Deletes an OAuth 2.0 Client
-- 
-- Delete an existing OAuth 2.0 Client by its ID.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
-- 
deleteOAuth2Client
  :: Id -- ^ "id" -  The id of the OAuth 2.0 Client.
  -> ORYHydraRequest DeleteOAuth2Client MimeNoContent NoContent MimeNoContent
deleteOAuth2Client :: Id
-> ORYHydraRequest
     DeleteOAuth2Client MimeNoContent NoContent MimeNoContent
deleteOAuth2Client (Id Text
id) =
  Method
-> [ByteString]
-> ORYHydraRequest
     DeleteOAuth2Client MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/clients/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]

data DeleteOAuth2Client  
instance Produces DeleteOAuth2Client MimeNoContent


-- *** deleteOAuth2Token

-- | @DELETE \/oauth2\/tokens@
-- 
-- Delete OAuth2 Access Tokens from a Client
-- 
-- This endpoint deletes OAuth2 access tokens issued for a client from the database
-- 
deleteOAuth2Token
  :: ClientId -- ^ "clientId"
  -> ORYHydraRequest DeleteOAuth2Token MimeNoContent NoContent MimeNoContent
deleteOAuth2Token :: ClientId
-> ORYHydraRequest
     DeleteOAuth2Token MimeNoContent NoContent MimeNoContent
deleteOAuth2Token (ClientId Text
clientId) =
  Method
-> [ByteString]
-> ORYHydraRequest
     DeleteOAuth2Token MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/oauth2/tokens"]
    ORYHydraRequest
  DeleteOAuth2Token MimeNoContent NoContent MimeNoContent
-> [QueryItem]
-> ORYHydraRequest
     DeleteOAuth2Token MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"client_id", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
clientId)

data DeleteOAuth2Token  
instance Produces DeleteOAuth2Token MimeNoContent


-- *** flushInactiveOAuth2Tokens

-- | @POST \/oauth2\/flush@
-- 
-- Flush Expired OAuth2 Access Tokens
-- 
-- This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow.
-- 
flushInactiveOAuth2Tokens
  :: (Consumes FlushInactiveOAuth2Tokens MimeJSON)
  => ORYHydraRequest FlushInactiveOAuth2Tokens MimeJSON NoContent MimeNoContent
flushInactiveOAuth2Tokens :: ORYHydraRequest
  FlushInactiveOAuth2Tokens MimeJSON NoContent MimeNoContent
flushInactiveOAuth2Tokens =
  Method
-> [ByteString]
-> ORYHydraRequest
     FlushInactiveOAuth2Tokens MimeJSON NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/oauth2/flush"]

data FlushInactiveOAuth2Tokens 
instance HasBodyParam FlushInactiveOAuth2Tokens FlushInactiveOAuth2TokensRequest 

-- | @application/json@
instance Consumes FlushInactiveOAuth2Tokens MimeJSON

instance Produces FlushInactiveOAuth2Tokens MimeNoContent


-- *** getConsentRequest

-- | @GET \/oauth2\/auth\/requests\/consent@
-- 
-- Get Consent Request Information
-- 
-- When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.  The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\").  The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.
-- 
getConsentRequest
  :: ConsentChallenge -- ^ "consentChallenge"
  -> ORYHydraRequest GetConsentRequest MimeNoContent ConsentRequest MimeJSON
getConsentRequest :: ConsentChallenge
-> ORYHydraRequest
     GetConsentRequest MimeNoContent ConsentRequest MimeJSON
getConsentRequest (ConsentChallenge Text
consentChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     GetConsentRequest MimeNoContent ConsentRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/oauth2/auth/requests/consent"]
    ORYHydraRequest
  GetConsentRequest MimeNoContent ConsentRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     GetConsentRequest MimeNoContent ConsentRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"consent_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
consentChallenge)

data GetConsentRequest  
-- | @application/json@
instance Produces GetConsentRequest MimeJSON


-- *** getJsonWebKey

-- | @GET \/keys\/{set}\/{kid}@
-- 
-- Fetch a JSON Web Key
-- 
-- This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
-- 
getJsonWebKey
  :: Kid -- ^ "kid" -  The kid of the desired key
  -> Set -- ^ "set" -  The set
  -> ORYHydraRequest GetJsonWebKey MimeNoContent JSONWebKeySet MimeJSON
getJsonWebKey :: Kid
-> Set
-> ORYHydraRequest
     GetJsonWebKey MimeNoContent JSONWebKeySet MimeJSON
getJsonWebKey (Kid Text
kid) (Set Text
set) =
  Method
-> [ByteString]
-> ORYHydraRequest
     GetJsonWebKey MimeNoContent JSONWebKeySet MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/keys/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
set,ByteString
"/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
kid]

data GetJsonWebKey  
-- | @application/json@
instance Produces GetJsonWebKey MimeJSON


-- *** getJsonWebKeySet

-- | @GET \/keys\/{set}@
-- 
-- Retrieve a JSON Web Key Set
-- 
-- This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
-- 
getJsonWebKeySet
  :: Set -- ^ "set" -  The set
  -> ORYHydraRequest GetJsonWebKeySet MimeNoContent JSONWebKeySet MimeJSON
getJsonWebKeySet :: Set
-> ORYHydraRequest
     GetJsonWebKeySet MimeNoContent JSONWebKeySet MimeJSON
getJsonWebKeySet (Set Text
set) =
  Method
-> [ByteString]
-> ORYHydraRequest
     GetJsonWebKeySet MimeNoContent JSONWebKeySet MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/keys/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
set]

data GetJsonWebKeySet  
-- | @application/json@
instance Produces GetJsonWebKeySet MimeJSON


-- *** getLoginRequest

-- | @GET \/oauth2\/auth\/requests\/login@
-- 
-- Get a Login Request
-- 
-- When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\").  The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
-- 
getLoginRequest
  :: LoginChallenge -- ^ "loginChallenge"
  -> ORYHydraRequest GetLoginRequest MimeNoContent LoginRequest MimeJSON
getLoginRequest :: LoginChallenge
-> ORYHydraRequest
     GetLoginRequest MimeNoContent LoginRequest MimeJSON
getLoginRequest (LoginChallenge Text
loginChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     GetLoginRequest MimeNoContent LoginRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/oauth2/auth/requests/login"]
    ORYHydraRequest GetLoginRequest MimeNoContent LoginRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     GetLoginRequest MimeNoContent LoginRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"login_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
loginChallenge)

data GetLoginRequest  
-- | @application/json@
instance Produces GetLoginRequest MimeJSON


-- *** getLogoutRequest

-- | @GET \/oauth2\/auth\/requests\/logout@
-- 
-- Get a Logout Request
-- 
-- Use this endpoint to fetch a logout request.
-- 
getLogoutRequest
  :: LogoutChallenge -- ^ "logoutChallenge"
  -> ORYHydraRequest GetLogoutRequest MimeNoContent LogoutRequest MimeJSON
getLogoutRequest :: LogoutChallenge
-> ORYHydraRequest
     GetLogoutRequest MimeNoContent LogoutRequest MimeJSON
getLogoutRequest (LogoutChallenge Text
logoutChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     GetLogoutRequest MimeNoContent LogoutRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/oauth2/auth/requests/logout"]
    ORYHydraRequest
  GetLogoutRequest MimeNoContent LogoutRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     GetLogoutRequest MimeNoContent LogoutRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"logout_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
logoutChallenge)

data GetLogoutRequest  
-- | @application/json@
instance Produces GetLogoutRequest MimeJSON


-- *** getOAuth2Client

-- | @GET \/clients\/{id}@
-- 
-- Get an OAuth 2.0 Client.
-- 
-- Get an OAUth 2.0 client by its ID. This endpoint never returns passwords.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
-- 
getOAuth2Client
  :: Id -- ^ "id" -  The id of the OAuth 2.0 Client.
  -> ORYHydraRequest GetOAuth2Client MimeNoContent OAuth2Client MimeJSON
getOAuth2Client :: Id
-> ORYHydraRequest
     GetOAuth2Client MimeNoContent OAuth2Client MimeJSON
getOAuth2Client (Id Text
id) =
  Method
-> [ByteString]
-> ORYHydraRequest
     GetOAuth2Client MimeNoContent OAuth2Client MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/clients/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]

data GetOAuth2Client  
-- | @application/json@
instance Produces GetOAuth2Client MimeJSON


-- *** getVersion

-- | @GET \/version@
-- 
-- Get Service Version
-- 
-- This endpoint returns the service version typically notated using semantic versioning.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.
-- 
getVersion
  :: ORYHydraRequest GetVersion MimeNoContent Version MimeJSON
getVersion :: ORYHydraRequest GetVersion MimeNoContent Version MimeJSON
getVersion =
  Method
-> [ByteString]
-> ORYHydraRequest GetVersion MimeNoContent Version MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/version"]

data GetVersion  
-- | @application/json@
instance Produces GetVersion MimeJSON


-- *** introspectOAuth2Token

-- | @POST \/oauth2\/introspect@
-- 
-- Introspect OAuth2 Tokens
-- 
-- The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `accessTokenExtra` during the consent flow.  For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
-- 
introspectOAuth2Token
  :: (Consumes IntrospectOAuth2Token MimeFormUrlEncoded)
  => Token -- ^ "token" -  The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned.
  -> ORYHydraRequest IntrospectOAuth2Token MimeFormUrlEncoded OAuth2TokenIntrospection MimeJSON
introspectOAuth2Token :: Token
-> ORYHydraRequest
     IntrospectOAuth2Token
     MimeFormUrlEncoded
     OAuth2TokenIntrospection
     MimeJSON
introspectOAuth2Token (Token Text
token) =
  Method
-> [ByteString]
-> ORYHydraRequest
     IntrospectOAuth2Token
     MimeFormUrlEncoded
     OAuth2TokenIntrospection
     MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/oauth2/introspect"]
    ORYHydraRequest
  IntrospectOAuth2Token
  MimeFormUrlEncoded
  OAuth2TokenIntrospection
  MimeJSON
-> Form
-> ORYHydraRequest
     IntrospectOAuth2Token
     MimeFormUrlEncoded
     OAuth2TokenIntrospection
     MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> Form -> ORYHydraRequest req contentType res accept
`addForm` (Method, Text) -> Form
forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"token", Text
token)

data IntrospectOAuth2Token  

-- | /Optional Param/ "scope" - An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
instance HasOptionalParam IntrospectOAuth2Token Scope where
  applyOptionalParam :: ORYHydraRequest IntrospectOAuth2Token contentType res accept
-> Scope
-> ORYHydraRequest IntrospectOAuth2Token contentType res accept
applyOptionalParam ORYHydraRequest IntrospectOAuth2Token contentType res accept
req (Scope Text
xs) =
    ORYHydraRequest IntrospectOAuth2Token contentType res accept
req ORYHydraRequest IntrospectOAuth2Token contentType res accept
-> Form
-> ORYHydraRequest IntrospectOAuth2Token contentType res accept
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> Form -> ORYHydraRequest req contentType res accept
`addForm` (Method, Text) -> Form
forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"scope", Text
xs)

-- | @application/x-www-form-urlencoded@
instance Consumes IntrospectOAuth2Token MimeFormUrlEncoded

-- | @application/json@
instance Produces IntrospectOAuth2Token MimeJSON


-- *** isInstanceAlive

-- | @GET \/health\/alive@
-- 
-- Check Alive Status
-- 
-- This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working.  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.  Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
-- 
isInstanceAlive
  :: ORYHydraRequest IsInstanceAlive MimeNoContent HealthStatus MimeJSON
isInstanceAlive :: ORYHydraRequest IsInstanceAlive MimeNoContent HealthStatus MimeJSON
isInstanceAlive =
  Method
-> [ByteString]
-> ORYHydraRequest
     IsInstanceAlive MimeNoContent HealthStatus MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/health/alive"]

data IsInstanceAlive  
-- | @application/json@
instance Produces IsInstanceAlive MimeJSON


-- *** listOAuth2Clients

-- | @GET \/clients@
-- 
-- List OAuth 2.0 Clients
-- 
-- This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
-- 
listOAuth2Clients
  :: ORYHydraRequest ListOAuth2Clients MimeNoContent [OAuth2Client] MimeJSON
listOAuth2Clients :: ORYHydraRequest
  ListOAuth2Clients MimeNoContent [OAuth2Client] MimeJSON
listOAuth2Clients =
  Method
-> [ByteString]
-> ORYHydraRequest
     ListOAuth2Clients MimeNoContent [OAuth2Client] MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/clients"]

data ListOAuth2Clients  

-- | /Optional Param/ "limit" - The maximum amount of policies returned, upper bound is 500 policies
instance HasOptionalParam ListOAuth2Clients Limit where
  applyOptionalParam :: ORYHydraRequest ListOAuth2Clients contentType res accept
-> Limit
-> ORYHydraRequest ListOAuth2Clients contentType res accept
applyOptionalParam ORYHydraRequest ListOAuth2Clients contentType res accept
req (Limit Integer
xs) =
    ORYHydraRequest ListOAuth2Clients contentType res accept
req ORYHydraRequest ListOAuth2Clients contentType res accept
-> [QueryItem]
-> ORYHydraRequest ListOAuth2Clients contentType res accept
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Integer) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"limit", Integer -> Maybe Integer
forall a. a -> Maybe a
Just Integer
xs)

-- | /Optional Param/ "offset" - The offset from where to start looking.
instance HasOptionalParam ListOAuth2Clients Offset where
  applyOptionalParam :: ORYHydraRequest ListOAuth2Clients contentType res accept
-> Offset
-> ORYHydraRequest ListOAuth2Clients contentType res accept
applyOptionalParam ORYHydraRequest ListOAuth2Clients contentType res accept
req (Offset Integer
xs) =
    ORYHydraRequest ListOAuth2Clients contentType res accept
req ORYHydraRequest ListOAuth2Clients contentType res accept
-> [QueryItem]
-> ORYHydraRequest ListOAuth2Clients contentType res accept
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Integer) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"offset", Integer -> Maybe Integer
forall a. a -> Maybe a
Just Integer
xs)
-- | @application/json@
instance Produces ListOAuth2Clients MimeJSON


-- *** listSubjectConsentSessions

-- | @GET \/oauth2\/auth\/sessions\/consent@
-- 
-- Lists All Consent Sessions of a Subject
-- 
-- This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK.   The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
-- 
listSubjectConsentSessions
  :: Subject -- ^ "subject"
  -> ORYHydraRequest ListSubjectConsentSessions MimeNoContent [PreviousConsentSession] MimeJSON
listSubjectConsentSessions :: Subject
-> ORYHydraRequest
     ListSubjectConsentSessions
     MimeNoContent
     [PreviousConsentSession]
     MimeJSON
listSubjectConsentSessions (Subject Text
subject) =
  Method
-> [ByteString]
-> ORYHydraRequest
     ListSubjectConsentSessions
     MimeNoContent
     [PreviousConsentSession]
     MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/oauth2/auth/sessions/consent"]
    ORYHydraRequest
  ListSubjectConsentSessions
  MimeNoContent
  [PreviousConsentSession]
  MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     ListSubjectConsentSessions
     MimeNoContent
     [PreviousConsentSession]
     MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"subject", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
subject)

data ListSubjectConsentSessions  
-- | @application/json@
instance Produces ListSubjectConsentSessions MimeJSON


-- *** prometheus

-- | @GET \/metrics\/prometheus@
-- 
-- Get Snapshot Metrics from the Hydra Service.
-- 
-- If you're using k8s, you can then add annotations to your deployment like so:  ``` metadata: annotations: prometheus.io/port: \"4445\" prometheus.io/path: \"/metrics/prometheus\" ```  If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.
-- 
prometheus
  :: ORYHydraRequest Prometheus MimeNoContent NoContent MimeNoContent
prometheus :: ORYHydraRequest Prometheus MimeNoContent NoContent MimeNoContent
prometheus =
  Method
-> [ByteString]
-> ORYHydraRequest Prometheus MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/metrics/prometheus"]

data Prometheus  
instance Produces Prometheus MimeNoContent


-- *** rejectConsentRequest

-- | @PUT \/oauth2\/auth\/requests\/consent\/reject@
-- 
-- Reject a Consent Request
-- 
-- When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.  The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\").  The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.  This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.  The response contains a redirect URL which the consent provider should redirect the user-agent to.
-- 
rejectConsentRequest
  :: (Consumes RejectConsentRequest MimeJSON)
  => ConsentChallenge -- ^ "consentChallenge"
  -> ORYHydraRequest RejectConsentRequest MimeJSON CompletedRequest MimeJSON
rejectConsentRequest :: ConsentChallenge
-> ORYHydraRequest
     RejectConsentRequest MimeJSON CompletedRequest MimeJSON
rejectConsentRequest (ConsentChallenge Text
consentChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     RejectConsentRequest MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/oauth2/auth/requests/consent/reject"]
    ORYHydraRequest
  RejectConsentRequest MimeJSON CompletedRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     RejectConsentRequest MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"consent_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
consentChallenge)

data RejectConsentRequest 
instance HasBodyParam RejectConsentRequest RejectRequest 

-- | @application/json@
instance Consumes RejectConsentRequest MimeJSON

-- | @application/json@
instance Produces RejectConsentRequest MimeJSON


-- *** rejectLoginRequest

-- | @PUT \/oauth2\/auth\/requests\/login\/reject@
-- 
-- Reject a Login Request
-- 
-- When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\").  The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.  This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied.  The response contains a redirect URL which the login provider should redirect the user-agent to.
-- 
rejectLoginRequest
  :: (Consumes RejectLoginRequest MimeJSON)
  => LoginChallenge -- ^ "loginChallenge"
  -> ORYHydraRequest RejectLoginRequest MimeJSON CompletedRequest MimeJSON
rejectLoginRequest :: LoginChallenge
-> ORYHydraRequest
     RejectLoginRequest MimeJSON CompletedRequest MimeJSON
rejectLoginRequest (LoginChallenge Text
loginChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     RejectLoginRequest MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/oauth2/auth/requests/login/reject"]
    ORYHydraRequest
  RejectLoginRequest MimeJSON CompletedRequest MimeJSON
-> [QueryItem]
-> ORYHydraRequest
     RejectLoginRequest MimeJSON CompletedRequest MimeJSON
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"login_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
loginChallenge)

data RejectLoginRequest 
instance HasBodyParam RejectLoginRequest RejectRequest 

-- | @application/json@
instance Consumes RejectLoginRequest MimeJSON

-- | @application/json@
instance Produces RejectLoginRequest MimeJSON


-- *** rejectLogoutRequest

-- | @PUT \/oauth2\/auth\/requests\/logout\/reject@
-- 
-- Reject a Logout Request
-- 
-- When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required.  The response is empty as the logout provider has to chose what action to perform next.
-- 
rejectLogoutRequest
  :: (Consumes RejectLogoutRequest contentType)
  => ContentType contentType -- ^ request content-type ('MimeType')
  -> LogoutChallenge -- ^ "logoutChallenge"
  -> ORYHydraRequest RejectLogoutRequest contentType NoContent MimeNoContent
rejectLogoutRequest :: ContentType contentType
-> LogoutChallenge
-> ORYHydraRequest
     RejectLogoutRequest contentType NoContent MimeNoContent
rejectLogoutRequest ContentType contentType
_ (LogoutChallenge Text
logoutChallenge) =
  Method
-> [ByteString]
-> ORYHydraRequest
     RejectLogoutRequest contentType NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/oauth2/auth/requests/logout/reject"]
    ORYHydraRequest
  RejectLogoutRequest contentType NoContent MimeNoContent
-> [QueryItem]
-> ORYHydraRequest
     RejectLogoutRequest contentType NoContent MimeNoContent
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"logout_challenge", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
logoutChallenge)

data RejectLogoutRequest 
instance HasBodyParam RejectLogoutRequest RejectRequest 

-- | @application/json@
instance Consumes RejectLogoutRequest MimeJSON
-- | @application/x-www-form-urlencoded@
instance Consumes RejectLogoutRequest MimeFormUrlEncoded

instance Produces RejectLogoutRequest MimeNoContent


-- *** revokeAuthenticationSession

-- | @DELETE \/oauth2\/auth\/sessions\/login@
-- 
-- Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
-- 
-- This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.
-- 
revokeAuthenticationSession
  :: Subject -- ^ "subject"
  -> ORYHydraRequest RevokeAuthenticationSession MimeNoContent NoContent MimeNoContent
revokeAuthenticationSession :: Subject
-> ORYHydraRequest
     RevokeAuthenticationSession MimeNoContent NoContent MimeNoContent
revokeAuthenticationSession (Subject Text
subject) =
  Method
-> [ByteString]
-> ORYHydraRequest
     RevokeAuthenticationSession MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/oauth2/auth/sessions/login"]
    ORYHydraRequest
  RevokeAuthenticationSession MimeNoContent NoContent MimeNoContent
-> [QueryItem]
-> ORYHydraRequest
     RevokeAuthenticationSession MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"subject", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
subject)

data RevokeAuthenticationSession  
instance Produces RevokeAuthenticationSession MimeNoContent


-- *** revokeConsentSessions

-- | @DELETE \/oauth2\/auth\/sessions\/consent@
-- 
-- Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
-- 
-- This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.
-- 
revokeConsentSessions
  :: Subject -- ^ "subject" -  The subject (Subject) who's consent sessions should be deleted.
  -> ORYHydraRequest RevokeConsentSessions MimeNoContent NoContent MimeNoContent
revokeConsentSessions :: Subject
-> ORYHydraRequest
     RevokeConsentSessions MimeNoContent NoContent MimeNoContent
revokeConsentSessions (Subject Text
subject) =
  Method
-> [ByteString]
-> ORYHydraRequest
     RevokeConsentSessions MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/oauth2/auth/sessions/consent"]
    ORYHydraRequest
  RevokeConsentSessions MimeNoContent NoContent MimeNoContent
-> [QueryItem]
-> ORYHydraRequest
     RevokeConsentSessions MimeNoContent NoContent MimeNoContent
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"subject", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
subject)

data RevokeConsentSessions  

-- | /Optional Param/ "client" - If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID
instance HasOptionalParam RevokeConsentSessions Client where
  applyOptionalParam :: ORYHydraRequest RevokeConsentSessions contentType res accept
-> Client
-> ORYHydraRequest RevokeConsentSessions contentType res accept
applyOptionalParam ORYHydraRequest RevokeConsentSessions contentType res accept
req (Client Text
xs) =
    ORYHydraRequest RevokeConsentSessions contentType res accept
req ORYHydraRequest RevokeConsentSessions contentType res accept
-> [QueryItem]
-> ORYHydraRequest RevokeConsentSessions contentType res accept
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Text) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"client", Text -> Maybe Text
forall a. a -> Maybe a
Just Text
xs)

-- | /Optional Param/ "all" - If set to `?all=true`, deletes all consent sessions by the Subject that have been granted.
instance HasOptionalParam RevokeConsentSessions All where
  applyOptionalParam :: ORYHydraRequest RevokeConsentSessions contentType res accept
-> All
-> ORYHydraRequest RevokeConsentSessions contentType res accept
applyOptionalParam ORYHydraRequest RevokeConsentSessions contentType res accept
req (All Bool
xs) =
    ORYHydraRequest RevokeConsentSessions contentType res accept
req ORYHydraRequest RevokeConsentSessions contentType res accept
-> [QueryItem]
-> ORYHydraRequest RevokeConsentSessions contentType res accept
forall req contentType res accept.
ORYHydraRequest req contentType res accept
-> [QueryItem] -> ORYHydraRequest req contentType res accept
`addQuery` (Method, Maybe Bool) -> [QueryItem]
forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"all", Bool -> Maybe Bool
forall a. a -> Maybe a
Just Bool
xs)
instance Produces RevokeConsentSessions MimeNoContent


-- *** updateJsonWebKey

-- | @PUT \/keys\/{set}\/{kid}@
-- 
-- Update a JSON Web Key
-- 
-- Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
-- 
updateJsonWebKey
  :: (Consumes UpdateJsonWebKey MimeJSON)
  => Kid -- ^ "kid" -  The kid of the desired key
  -> Set -- ^ "set" -  The set
  -> ORYHydraRequest UpdateJsonWebKey MimeJSON JSONWebKey MimeJSON
updateJsonWebKey :: Kid
-> Set
-> ORYHydraRequest UpdateJsonWebKey MimeJSON JSONWebKey MimeJSON
updateJsonWebKey (Kid Text
kid) (Set Text
set) =
  Method
-> [ByteString]
-> ORYHydraRequest UpdateJsonWebKey MimeJSON JSONWebKey MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/keys/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
set,ByteString
"/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
kid]

data UpdateJsonWebKey 
instance HasBodyParam UpdateJsonWebKey JSONWebKey 

-- | @application/json@
instance Consumes UpdateJsonWebKey MimeJSON

-- | @application/json@
instance Produces UpdateJsonWebKey MimeJSON


-- *** updateJsonWebKeySet

-- | @PUT \/keys\/{set}@
-- 
-- Update a JSON Web Key Set
-- 
-- Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.  A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
-- 
updateJsonWebKeySet
  :: (Consumes UpdateJsonWebKeySet MimeJSON)
  => Set -- ^ "set" -  The set
  -> ORYHydraRequest UpdateJsonWebKeySet MimeJSON JSONWebKeySet MimeJSON
updateJsonWebKeySet :: Set
-> ORYHydraRequest
     UpdateJsonWebKeySet MimeJSON JSONWebKeySet MimeJSON
updateJsonWebKeySet (Set Text
set) =
  Method
-> [ByteString]
-> ORYHydraRequest
     UpdateJsonWebKeySet MimeJSON JSONWebKeySet MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/keys/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
set]

data UpdateJsonWebKeySet 
instance HasBodyParam UpdateJsonWebKeySet JSONWebKeySet 

-- | @application/json@
instance Consumes UpdateJsonWebKeySet MimeJSON

-- | @application/json@
instance Produces UpdateJsonWebKeySet MimeJSON


-- *** updateOAuth2Client

-- | @PUT \/clients\/{id}@
-- 
-- Update an OAuth 2.0 Client
-- 
-- Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe.  OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
-- 
updateOAuth2Client
  :: (Consumes UpdateOAuth2Client MimeJSON, MimeRender MimeJSON OAuth2Client)
  => OAuth2Client -- ^ "body"
  -> Id -- ^ "id"
  -> ORYHydraRequest UpdateOAuth2Client MimeJSON OAuth2Client MimeJSON
updateOAuth2Client :: OAuth2Client
-> Id
-> ORYHydraRequest
     UpdateOAuth2Client MimeJSON OAuth2Client MimeJSON
updateOAuth2Client OAuth2Client
body (Id Text
id) =
  Method
-> [ByteString]
-> ORYHydraRequest
     UpdateOAuth2Client MimeJSON OAuth2Client MimeJSON
forall req contentType res accept.
Method
-> [ByteString] -> ORYHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/clients/",Text -> ByteString
forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
    ORYHydraRequest UpdateOAuth2Client MimeJSON OAuth2Client MimeJSON
-> OAuth2Client
-> ORYHydraRequest
     UpdateOAuth2Client MimeJSON OAuth2Client MimeJSON
forall req param contentType res accept.
(HasBodyParam req param, Consumes req contentType,
 MimeRender contentType param) =>
ORYHydraRequest req contentType res accept
-> param -> ORYHydraRequest req contentType res accept
`setBodyParam` OAuth2Client
body

data UpdateOAuth2Client 
instance HasBodyParam UpdateOAuth2Client OAuth2Client 

-- | @application/json@
instance Consumes UpdateOAuth2Client MimeJSON

-- | @application/json@
instance Produces UpdateOAuth2Client MimeJSON