{-
Ory Hydra API
Documentation for all of Ory Hydra's APIs.
OpenAPI Version: 3.0.3
Ory Hydra API API version:
Contact: hi@ory.sh
Generated by OpenAPI Generator (https://openapi-generator.tech)
-}
{-|
Module : ORYHydra.API.Jwk
-}
{-# 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.Jwk 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
-- ** Jwk
-- *** createJsonWebKeySet0
-- | @POST \/admin\/keys\/{set}@
--
-- Create 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.
--
createJsonWebKeySet0
:: (Consumes CreateJsonWebKeySet0 MimeJSON, MimeRender MimeJSON CreateJsonWebKeySet)
=> CreateJsonWebKeySet -- ^ "createJsonWebKeySet"
-> Set -- ^ "set" - The JSON Web Key Set ID
-> ORYHydraRequest CreateJsonWebKeySet0 MimeJSON JsonWebKeySet MimeJSON
createJsonWebKeySet0 createJsonWebKeySet (Set set) =
_mkRequest "POST" ["/admin/keys/",toPath set]
`setBodyParam` createJsonWebKeySet
data CreateJsonWebKeySet0
instance HasBodyParam CreateJsonWebKeySet0 CreateJsonWebKeySet
-- | @application/json@
instance Consumes CreateJsonWebKeySet0 MimeJSON
-- | @application/json@
instance Produces CreateJsonWebKeySet0 MimeJSON
-- *** deleteJsonWebKey
-- | @DELETE \/admin\/keys\/{set}\/{kid}@
--
-- Delete 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
:: Set -- ^ "set" - The JSON Web Key Set
-> Kid -- ^ "kid" - The JSON Web Key ID (kid)
-> ORYHydraRequest DeleteJsonWebKey MimeNoContent NoContent MimeNoContent
deleteJsonWebKey (Set set) (Kid kid) =
_mkRequest "DELETE" ["/admin/keys/",toPath set,"/",toPath kid]
data DeleteJsonWebKey
instance Produces DeleteJsonWebKey MimeNoContent
-- *** deleteJsonWebKeySet
-- | @DELETE \/admin\/keys\/{set}@
--
-- Delete 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 JSON Web Key Set
-> ORYHydraRequest DeleteJsonWebKeySet MimeNoContent NoContent MimeNoContent
deleteJsonWebKeySet (Set set) =
_mkRequest "DELETE" ["/admin/keys/",toPath set]
data DeleteJsonWebKeySet
instance Produces DeleteJsonWebKeySet MimeNoContent
-- *** getJsonWebKey
-- | @GET \/admin\/keys\/{set}\/{kid}@
--
-- Get JSON Web Key
--
-- This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).
--
getJsonWebKey
:: Set -- ^ "set" - JSON Web Key Set ID
-> Kid -- ^ "kid" - JSON Web Key ID
-> ORYHydraRequest GetJsonWebKey MimeNoContent JsonWebKeySet MimeJSON
getJsonWebKey (Set set) (Kid kid) =
_mkRequest "GET" ["/admin/keys/",toPath set,"/",toPath kid]
data GetJsonWebKey
-- | @application/json@
instance Produces GetJsonWebKey MimeJSON
-- *** getJsonWebKeySet
-- | @GET \/admin\/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" - JSON Web Key Set ID
-> ORYHydraRequest GetJsonWebKeySet MimeNoContent JsonWebKeySet MimeJSON
getJsonWebKeySet (Set set) =
_mkRequest "GET" ["/admin/keys/",toPath set]
data GetJsonWebKeySet
-- | @application/json@
instance Produces GetJsonWebKeySet MimeJSON
-- *** setJsonWebKey
-- | @PUT \/admin\/keys\/{set}\/{kid}@
--
-- Set 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.
--
setJsonWebKey
:: (Consumes SetJsonWebKey MimeJSON)
=> Set -- ^ "set" - The JSON Web Key Set ID
-> Kid -- ^ "kid" - JSON Web Key ID
-> ORYHydraRequest SetJsonWebKey MimeJSON JsonWebKey MimeJSON
setJsonWebKey (Set set) (Kid kid) =
_mkRequest "PUT" ["/admin/keys/",toPath set,"/",toPath kid]
data SetJsonWebKey
instance HasBodyParam SetJsonWebKey JsonWebKey
-- | @application/json@
instance Consumes SetJsonWebKey MimeJSON
-- | @application/json@
instance Produces SetJsonWebKey MimeJSON
-- *** setJsonWebKeySet
-- | @PUT \/admin\/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.
--
setJsonWebKeySet
:: (Consumes SetJsonWebKeySet MimeJSON)
=> Set -- ^ "set" - The JSON Web Key Set ID
-> ORYHydraRequest SetJsonWebKeySet MimeJSON JsonWebKeySet MimeJSON
setJsonWebKeySet (Set set) =
_mkRequest "PUT" ["/admin/keys/",toPath set]
data SetJsonWebKeySet
instance HasBodyParam SetJsonWebKeySet JsonWebKeySet
-- | @application/json@
instance Consumes SetJsonWebKeySet MimeJSON
-- | @application/json@
instance Produces SetJsonWebKeySet MimeJSON