{-# 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.Oidc 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
createOidcDynamicClient
:: (Consumes CreateOidcDynamicClient MimeJSON, MimeRender MimeJSON OAuth2Client)
=> OAuth2Client
-> OryHydraRequest CreateOidcDynamicClient MimeJSON OAuth2Client MimeJSON
createOidcDynamicClient :: (Consumes CreateOidcDynamicClient MimeJSON,
MimeRender MimeJSON OAuth2Client) =>
OAuth2Client
-> OryHydraRequest
CreateOidcDynamicClient MimeJSON OAuth2Client MimeJSON
createOidcDynamicClient OAuth2Client
oAuth2Client =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/oauth2/register"]
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
oAuth2Client
data CreateOidcDynamicClient
instance HasBodyParam CreateOidcDynamicClient OAuth2Client
instance Consumes CreateOidcDynamicClient MimeJSON
instance Produces CreateOidcDynamicClient MimeJSON
deleteOidcDynamicClient
:: Id
-> OryHydraRequest DeleteOidcDynamicClient MimeNoContent NoContent MimeNoContent
deleteOidcDynamicClient :: Id
-> OryHydraRequest
DeleteOidcDynamicClient MimeNoContent NoContent MimeNoContent
deleteOidcDynamicClient (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/oauth2/register/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
forall authMethod req contentType res accept.
AuthMethod authMethod =>
OryHydraRequest req contentType res accept
-> Proxy authMethod -> OryHydraRequest req contentType res accept
`_hasAuthType` (forall {k} (t :: k). Proxy t
P.Proxy :: P.Proxy AuthBasicBearer)
data DeleteOidcDynamicClient
instance Produces DeleteOidcDynamicClient MimeNoContent
discoverOidcConfiguration
:: OryHydraRequest DiscoverOidcConfiguration MimeNoContent OidcConfiguration MimeJSON
discoverOidcConfiguration :: OryHydraRequest
DiscoverOidcConfiguration MimeNoContent OidcConfiguration MimeJSON
discoverOidcConfiguration =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/.well-known/openid-configuration"]
data DiscoverOidcConfiguration
instance Produces DiscoverOidcConfiguration MimeJSON
getOidcDynamicClient
:: Id
-> OryHydraRequest GetOidcDynamicClient MimeNoContent OAuth2Client MimeJSON
getOidcDynamicClient :: Id
-> OryHydraRequest
GetOidcDynamicClient MimeNoContent OAuth2Client MimeJSON
getOidcDynamicClient (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/oauth2/register/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
forall authMethod req contentType res accept.
AuthMethod authMethod =>
OryHydraRequest req contentType res accept
-> Proxy authMethod -> OryHydraRequest req contentType res accept
`_hasAuthType` (forall {k} (t :: k). Proxy t
P.Proxy :: P.Proxy AuthBasicBearer)
data GetOidcDynamicClient
instance Produces GetOidcDynamicClient MimeJSON
getOidcUserInfo
:: OryHydraRequest GetOidcUserInfo MimeNoContent OidcUserInfo MimeJSON
getOidcUserInfo :: OryHydraRequest GetOidcUserInfo MimeNoContent OidcUserInfo MimeJSON
getOidcUserInfo =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/userinfo"]
forall authMethod req contentType res accept.
AuthMethod authMethod =>
OryHydraRequest req contentType res accept
-> Proxy authMethod -> OryHydraRequest req contentType res accept
`_hasAuthType` (forall {k} (t :: k). Proxy t
P.Proxy :: P.Proxy AuthOAuthOauth2)
data GetOidcUserInfo
instance Produces GetOidcUserInfo MimeJSON
revokeOidcSession
:: OryHydraRequest RevokeOidcSession MimeNoContent NoContent MimeNoContent
revokeOidcSession :: OryHydraRequest
RevokeOidcSession MimeNoContent NoContent MimeNoContent
revokeOidcSession =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/oauth2/sessions/logout"]
data RevokeOidcSession
instance Produces RevokeOidcSession MimeNoContent
setOidcDynamicClient
:: (Consumes SetOidcDynamicClient MimeJSON, MimeRender MimeJSON OAuth2Client)
=> OAuth2Client
-> Id
-> OryHydraRequest SetOidcDynamicClient MimeJSON OAuth2Client MimeJSON
setOidcDynamicClient :: (Consumes SetOidcDynamicClient MimeJSON,
MimeRender MimeJSON OAuth2Client) =>
OAuth2Client
-> Id
-> OryHydraRequest
SetOidcDynamicClient MimeJSON OAuth2Client MimeJSON
setOidcDynamicClient OAuth2Client
oAuth2Client (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/oauth2/register/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
forall authMethod req contentType res accept.
AuthMethod authMethod =>
OryHydraRequest req contentType res accept
-> Proxy authMethod -> OryHydraRequest req contentType res accept
`_hasAuthType` (forall {k} (t :: k). Proxy t
P.Proxy :: P.Proxy AuthBasicBearer)
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
oAuth2Client
data SetOidcDynamicClient
instance HasBodyParam SetOidcDynamicClient OAuth2Client
instance Consumes SetOidcDynamicClient MimeJSON
instance Produces SetOidcDynamicClient MimeJSON