{-# 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.OAuth2 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
acceptOAuth2ConsentRequest0
:: (Consumes AcceptOAuth2ConsentRequest0 MimeJSON)
=> ConsentChallenge
-> OryHydraRequest AcceptOAuth2ConsentRequest0 MimeJSON OAuth2RedirectTo MimeJSON
acceptOAuth2ConsentRequest0 :: Consumes AcceptOAuth2ConsentRequest0 MimeJSON =>
ConsentChallenge
-> OryHydraRequest
AcceptOAuth2ConsentRequest0 MimeJSON OAuth2RedirectTo MimeJSON
acceptOAuth2ConsentRequest0 (ConsentChallenge Text
consentChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/oauth2/auth/requests/consent/accept"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"consent_challenge", forall a. a -> Maybe a
Just Text
consentChallenge)
data AcceptOAuth2ConsentRequest0
instance HasBodyParam AcceptOAuth2ConsentRequest0 AcceptOAuth2ConsentRequest
instance Consumes AcceptOAuth2ConsentRequest0 MimeJSON
instance Produces AcceptOAuth2ConsentRequest0 MimeJSON
acceptOAuth2LoginRequest0
:: (Consumes AcceptOAuth2LoginRequest0 MimeJSON)
=> LoginChallenge
-> OryHydraRequest AcceptOAuth2LoginRequest0 MimeJSON OAuth2RedirectTo MimeJSON
acceptOAuth2LoginRequest0 :: Consumes AcceptOAuth2LoginRequest0 MimeJSON =>
LoginChallenge
-> OryHydraRequest
AcceptOAuth2LoginRequest0 MimeJSON OAuth2RedirectTo MimeJSON
acceptOAuth2LoginRequest0 (LoginChallenge Text
loginChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/oauth2/auth/requests/login/accept"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"login_challenge", forall a. a -> Maybe a
Just Text
loginChallenge)
data AcceptOAuth2LoginRequest0
instance HasBodyParam AcceptOAuth2LoginRequest0 AcceptOAuth2LoginRequest
instance Consumes AcceptOAuth2LoginRequest0 MimeJSON
instance Produces AcceptOAuth2LoginRequest0 MimeJSON
acceptOAuth2LogoutRequest
:: LogoutChallenge
-> OryHydraRequest AcceptOAuth2LogoutRequest MimeNoContent OAuth2RedirectTo MimeJSON
acceptOAuth2LogoutRequest :: LogoutChallenge
-> OryHydraRequest
AcceptOAuth2LogoutRequest MimeNoContent OAuth2RedirectTo MimeJSON
acceptOAuth2LogoutRequest (LogoutChallenge Text
logoutChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/oauth2/auth/requests/logout/accept"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"logout_challenge", forall a. a -> Maybe a
Just Text
logoutChallenge)
data AcceptOAuth2LogoutRequest
instance Produces AcceptOAuth2LogoutRequest MimeJSON
createOAuth2Client
:: (Consumes CreateOAuth2Client MimeJSON, MimeRender MimeJSON OAuth2Client)
=> OAuth2Client
-> OryHydraRequest CreateOAuth2Client MimeJSON OAuth2Client MimeJSON
createOAuth2Client :: (Consumes CreateOAuth2Client MimeJSON,
MimeRender MimeJSON OAuth2Client) =>
OAuth2Client
-> OryHydraRequest
CreateOAuth2Client MimeJSON OAuth2Client MimeJSON
createOAuth2Client OAuth2Client
oAuth2Client =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/admin/clients"]
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 CreateOAuth2Client
instance HasBodyParam CreateOAuth2Client OAuth2Client
instance Consumes CreateOAuth2Client MimeJSON
instance Produces CreateOAuth2Client MimeJSON
deleteOAuth2Client
:: Id
-> OryHydraRequest DeleteOAuth2Client MimeNoContent NoContent MimeNoContent
deleteOAuth2Client :: Id
-> OryHydraRequest
DeleteOAuth2Client MimeNoContent NoContent MimeNoContent
deleteOAuth2Client (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/admin/clients/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
data DeleteOAuth2Client
instance Produces DeleteOAuth2Client MimeNoContent
deleteOAuth2Token
:: ClientId
-> OryHydraRequest DeleteOAuth2Token MimeNoContent NoContent MimeNoContent
deleteOAuth2Token :: ClientId
-> OryHydraRequest
DeleteOAuth2Token MimeNoContent NoContent MimeNoContent
deleteOAuth2Token (ClientId Text
clientId) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/admin/oauth2/tokens"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"client_id", forall a. a -> Maybe a
Just Text
clientId)
data DeleteOAuth2Token
instance Produces DeleteOAuth2Token MimeNoContent
deleteTrustedOAuth2JwtGrantIssuer
:: Id
-> OryHydraRequest DeleteTrustedOAuth2JwtGrantIssuer MimeNoContent NoContent MimeNoContent
deleteTrustedOAuth2JwtGrantIssuer :: Id
-> OryHydraRequest
DeleteTrustedOAuth2JwtGrantIssuer
MimeNoContent
NoContent
MimeNoContent
deleteTrustedOAuth2JwtGrantIssuer (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/admin/trust/grants/jwt-bearer/issuers/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
data DeleteTrustedOAuth2JwtGrantIssuer
instance Produces DeleteTrustedOAuth2JwtGrantIssuer MimeNoContent
getOAuth2Client
:: Id
-> OryHydraRequest GetOAuth2Client MimeNoContent OAuth2Client MimeJSON
getOAuth2Client :: Id
-> OryHydraRequest
GetOAuth2Client MimeNoContent OAuth2Client MimeJSON
getOAuth2Client (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/clients/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
data GetOAuth2Client
instance Produces GetOAuth2Client MimeJSON
getOAuth2ConsentRequest
:: ConsentChallenge
-> OryHydraRequest GetOAuth2ConsentRequest MimeNoContent OAuth2ConsentRequest MimeJSON
getOAuth2ConsentRequest :: ConsentChallenge
-> OryHydraRequest
GetOAuth2ConsentRequest MimeNoContent OAuth2ConsentRequest MimeJSON
getOAuth2ConsentRequest (ConsentChallenge Text
consentChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/oauth2/auth/requests/consent"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"consent_challenge", forall a. a -> Maybe a
Just Text
consentChallenge)
data GetOAuth2ConsentRequest
instance Produces GetOAuth2ConsentRequest MimeJSON
getOAuth2LoginRequest
:: LoginChallenge
-> OryHydraRequest GetOAuth2LoginRequest MimeNoContent OAuth2LoginRequest MimeJSON
getOAuth2LoginRequest :: LoginChallenge
-> OryHydraRequest
GetOAuth2LoginRequest MimeNoContent OAuth2LoginRequest MimeJSON
getOAuth2LoginRequest (LoginChallenge Text
loginChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/oauth2/auth/requests/login"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"login_challenge", forall a. a -> Maybe a
Just Text
loginChallenge)
data GetOAuth2LoginRequest
instance Produces GetOAuth2LoginRequest MimeJSON
getOAuth2LogoutRequest
:: LogoutChallenge
-> OryHydraRequest GetOAuth2LogoutRequest MimeNoContent OAuth2LogoutRequest MimeJSON
getOAuth2LogoutRequest :: LogoutChallenge
-> OryHydraRequest
GetOAuth2LogoutRequest MimeNoContent OAuth2LogoutRequest MimeJSON
getOAuth2LogoutRequest (LogoutChallenge Text
logoutChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/oauth2/auth/requests/logout"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"logout_challenge", forall a. a -> Maybe a
Just Text
logoutChallenge)
data GetOAuth2LogoutRequest
instance Produces GetOAuth2LogoutRequest MimeJSON
getTrustedOAuth2JwtGrantIssuer
:: Id
-> OryHydraRequest GetTrustedOAuth2JwtGrantIssuer MimeNoContent TrustedOAuth2JwtGrantIssuer MimeJSON
getTrustedOAuth2JwtGrantIssuer :: Id
-> OryHydraRequest
GetTrustedOAuth2JwtGrantIssuer
MimeNoContent
TrustedOAuth2JwtGrantIssuer
MimeJSON
getTrustedOAuth2JwtGrantIssuer (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/trust/grants/jwt-bearer/issuers/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
data GetTrustedOAuth2JwtGrantIssuer
instance Produces GetTrustedOAuth2JwtGrantIssuer MimeJSON
introspectOAuth2Token
:: (Consumes IntrospectOAuth2Token MimeFormUrlEncoded)
=> Token
-> OryHydraRequest IntrospectOAuth2Token MimeFormUrlEncoded IntrospectedOAuth2Token MimeJSON
introspectOAuth2Token :: Consumes IntrospectOAuth2Token MimeFormUrlEncoded =>
Token
-> OryHydraRequest
IntrospectOAuth2Token
MimeFormUrlEncoded
IntrospectedOAuth2Token
MimeJSON
introspectOAuth2Token (Token Text
token) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/admin/oauth2/introspect"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"token", Text
token)
data IntrospectOAuth2Token
instance HasOptionalParam IntrospectOAuth2Token Scope where
applyOptionalParam :: forall contentType res accept.
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 forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"scope", Text
xs)
instance Consumes IntrospectOAuth2Token MimeFormUrlEncoded
instance Produces IntrospectOAuth2Token MimeJSON
listOAuth2Clients
:: OryHydraRequest ListOAuth2Clients MimeNoContent [OAuth2Client] MimeJSON
listOAuth2Clients :: OryHydraRequest
ListOAuth2Clients MimeNoContent [OAuth2Client] MimeJSON
listOAuth2Clients =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/clients"]
data ListOAuth2Clients
instance HasOptionalParam ListOAuth2Clients PageSize where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest ListOAuth2Clients contentType res accept
-> PageSize
-> OryHydraRequest ListOAuth2Clients contentType res accept
applyOptionalParam OryHydraRequest ListOAuth2Clients contentType res accept
req (PageSize Integer
xs) =
OryHydraRequest ListOAuth2Clients contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"page_size", forall a. a -> Maybe a
Just Integer
xs)
instance HasOptionalParam ListOAuth2Clients PageToken where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest ListOAuth2Clients contentType res accept
-> PageToken
-> OryHydraRequest ListOAuth2Clients contentType res accept
applyOptionalParam OryHydraRequest ListOAuth2Clients contentType res accept
req (PageToken Text
xs) =
OryHydraRequest ListOAuth2Clients contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"page_token", forall a. a -> Maybe a
Just Text
xs)
instance HasOptionalParam ListOAuth2Clients ClientName where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest ListOAuth2Clients contentType res accept
-> ClientName
-> OryHydraRequest ListOAuth2Clients contentType res accept
applyOptionalParam OryHydraRequest ListOAuth2Clients contentType res accept
req (ClientName Text
xs) =
OryHydraRequest ListOAuth2Clients contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"client_name", forall a. a -> Maybe a
Just Text
xs)
instance HasOptionalParam ListOAuth2Clients Owner where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest ListOAuth2Clients contentType res accept
-> Owner
-> OryHydraRequest ListOAuth2Clients contentType res accept
applyOptionalParam OryHydraRequest ListOAuth2Clients contentType res accept
req (Owner Text
xs) =
OryHydraRequest ListOAuth2Clients contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"owner", forall a. a -> Maybe a
Just Text
xs)
instance Produces ListOAuth2Clients MimeJSON
listOAuth2ConsentSessions
:: Subject
-> OryHydraRequest ListOAuth2ConsentSessions MimeNoContent [OAuth2ConsentSession] MimeJSON
listOAuth2ConsentSessions :: Subject
-> OryHydraRequest
ListOAuth2ConsentSessions
MimeNoContent
[OAuth2ConsentSession]
MimeJSON
listOAuth2ConsentSessions (Subject Text
subject) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/oauth2/auth/sessions/consent"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"subject", forall a. a -> Maybe a
Just Text
subject)
data ListOAuth2ConsentSessions
instance HasOptionalParam ListOAuth2ConsentSessions PageSize where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest ListOAuth2ConsentSessions contentType res accept
-> PageSize
-> OryHydraRequest ListOAuth2ConsentSessions contentType res accept
applyOptionalParam OryHydraRequest ListOAuth2ConsentSessions contentType res accept
req (PageSize Integer
xs) =
OryHydraRequest ListOAuth2ConsentSessions contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"page_size", forall a. a -> Maybe a
Just Integer
xs)
instance HasOptionalParam ListOAuth2ConsentSessions PageToken where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest ListOAuth2ConsentSessions contentType res accept
-> PageToken
-> OryHydraRequest ListOAuth2ConsentSessions contentType res accept
applyOptionalParam OryHydraRequest ListOAuth2ConsentSessions contentType res accept
req (PageToken Text
xs) =
OryHydraRequest ListOAuth2ConsentSessions contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"page_token", forall a. a -> Maybe a
Just Text
xs)
instance HasOptionalParam ListOAuth2ConsentSessions LoginSessionId where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest ListOAuth2ConsentSessions contentType res accept
-> LoginSessionId
-> OryHydraRequest ListOAuth2ConsentSessions contentType res accept
applyOptionalParam OryHydraRequest ListOAuth2ConsentSessions contentType res accept
req (LoginSessionId Text
xs) =
OryHydraRequest ListOAuth2ConsentSessions contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"login_session_id", forall a. a -> Maybe a
Just Text
xs)
instance Produces ListOAuth2ConsentSessions MimeJSON
listTrustedOAuth2JwtGrantIssuers
:: OryHydraRequest ListTrustedOAuth2JwtGrantIssuers MimeNoContent [TrustedOAuth2JwtGrantIssuer] MimeJSON
listTrustedOAuth2JwtGrantIssuers :: OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers
MimeNoContent
[TrustedOAuth2JwtGrantIssuer]
MimeJSON
listTrustedOAuth2JwtGrantIssuers =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/admin/trust/grants/jwt-bearer/issuers"]
data ListTrustedOAuth2JwtGrantIssuers
instance HasOptionalParam ListTrustedOAuth2JwtGrantIssuers MaxItems where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
-> MaxItems
-> OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
applyOptionalParam OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
req (MaxItems Integer
xs) =
OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"MaxItems", forall a. a -> Maybe a
Just Integer
xs)
instance HasOptionalParam ListTrustedOAuth2JwtGrantIssuers DefaultItems where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
-> DefaultItems
-> OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
applyOptionalParam OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
req (DefaultItems Integer
xs) =
OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"DefaultItems", forall a. a -> Maybe a
Just Integer
xs)
instance HasOptionalParam ListTrustedOAuth2JwtGrantIssuers Issuer where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
-> Issuer
-> OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
applyOptionalParam OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
req (Issuer Text
xs) =
OryHydraRequest
ListTrustedOAuth2JwtGrantIssuers contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"issuer", forall a. a -> Maybe a
Just Text
xs)
instance Produces ListTrustedOAuth2JwtGrantIssuers MimeJSON
oAuth2Authorize
:: OryHydraRequest OAuth2Authorize MimeNoContent ErrorOAuth2 MimeJSON
oAuth2Authorize :: OryHydraRequest OAuth2Authorize MimeNoContent ErrorOAuth2 MimeJSON
oAuth2Authorize =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"GET" [ByteString
"/oauth2/auth"]
data OAuth2Authorize
instance Produces OAuth2Authorize MimeJSON
oauth2TokenExchange
:: (Consumes Oauth2TokenExchange MimeFormUrlEncoded)
=> GrantType
-> OryHydraRequest Oauth2TokenExchange MimeFormUrlEncoded OAuth2TokenExchange MimeJSON
oauth2TokenExchange :: Consumes Oauth2TokenExchange MimeFormUrlEncoded =>
GrantType
-> OryHydraRequest
Oauth2TokenExchange MimeFormUrlEncoded OAuth2TokenExchange MimeJSON
oauth2TokenExchange (GrantType Text
grantType) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/oauth2/token"]
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 AuthBasicBasic)
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)
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"grant_type", Text
grantType)
data Oauth2TokenExchange
instance HasOptionalParam Oauth2TokenExchange ClientId where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest Oauth2TokenExchange contentType res accept
-> ClientId
-> OryHydraRequest Oauth2TokenExchange contentType res accept
applyOptionalParam OryHydraRequest Oauth2TokenExchange contentType res accept
req (ClientId Text
xs) =
OryHydraRequest Oauth2TokenExchange contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"client_id", Text
xs)
instance HasOptionalParam Oauth2TokenExchange Code where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest Oauth2TokenExchange contentType res accept
-> Code
-> OryHydraRequest Oauth2TokenExchange contentType res accept
applyOptionalParam OryHydraRequest Oauth2TokenExchange contentType res accept
req (Code Text
xs) =
OryHydraRequest Oauth2TokenExchange contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"code", Text
xs)
instance HasOptionalParam Oauth2TokenExchange RedirectUri where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest Oauth2TokenExchange contentType res accept
-> RedirectUri
-> OryHydraRequest Oauth2TokenExchange contentType res accept
applyOptionalParam OryHydraRequest Oauth2TokenExchange contentType res accept
req (RedirectUri Text
xs) =
OryHydraRequest Oauth2TokenExchange contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"redirect_uri", Text
xs)
instance HasOptionalParam Oauth2TokenExchange RefreshToken where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest Oauth2TokenExchange contentType res accept
-> RefreshToken
-> OryHydraRequest Oauth2TokenExchange contentType res accept
applyOptionalParam OryHydraRequest Oauth2TokenExchange contentType res accept
req (RefreshToken Text
xs) =
OryHydraRequest Oauth2TokenExchange contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"refresh_token", Text
xs)
instance Consumes Oauth2TokenExchange MimeFormUrlEncoded
instance Produces Oauth2TokenExchange MimeJSON
patchOAuth2Client
:: (Consumes PatchOAuth2Client MimeJSON, MimeRender MimeJSON JsonPatch2)
=> JsonPatch2
-> Id
-> OryHydraRequest PatchOAuth2Client MimeJSON OAuth2Client MimeJSON
patchOAuth2Client :: (Consumes PatchOAuth2Client MimeJSON,
MimeRender MimeJSON JsonPatch2) =>
JsonPatch2
-> Id
-> OryHydraRequest PatchOAuth2Client MimeJSON OAuth2Client MimeJSON
patchOAuth2Client JsonPatch2
jsonPatch (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PATCH" [ByteString
"/admin/clients/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
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` JsonPatch2
jsonPatch
data PatchOAuth2Client
instance HasBodyParam PatchOAuth2Client JsonPatch2
instance Consumes PatchOAuth2Client MimeJSON
instance Produces PatchOAuth2Client MimeJSON
rejectOAuth2ConsentRequest
:: (Consumes RejectOAuth2ConsentRequest MimeJSON)
=> ConsentChallenge
-> OryHydraRequest RejectOAuth2ConsentRequest MimeJSON OAuth2RedirectTo MimeJSON
rejectOAuth2ConsentRequest :: Consumes RejectOAuth2ConsentRequest MimeJSON =>
ConsentChallenge
-> OryHydraRequest
RejectOAuth2ConsentRequest MimeJSON OAuth2RedirectTo MimeJSON
rejectOAuth2ConsentRequest (ConsentChallenge Text
consentChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/oauth2/auth/requests/consent/reject"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"consent_challenge", forall a. a -> Maybe a
Just Text
consentChallenge)
data RejectOAuth2ConsentRequest
instance HasBodyParam RejectOAuth2ConsentRequest RejectOAuth2Request
instance Consumes RejectOAuth2ConsentRequest MimeJSON
instance Produces RejectOAuth2ConsentRequest MimeJSON
rejectOAuth2LoginRequest
:: (Consumes RejectOAuth2LoginRequest MimeJSON)
=> LoginChallenge
-> OryHydraRequest RejectOAuth2LoginRequest MimeJSON OAuth2RedirectTo MimeJSON
rejectOAuth2LoginRequest :: Consumes RejectOAuth2LoginRequest MimeJSON =>
LoginChallenge
-> OryHydraRequest
RejectOAuth2LoginRequest MimeJSON OAuth2RedirectTo MimeJSON
rejectOAuth2LoginRequest (LoginChallenge Text
loginChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/oauth2/auth/requests/login/reject"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"login_challenge", forall a. a -> Maybe a
Just Text
loginChallenge)
data RejectOAuth2LoginRequest
instance HasBodyParam RejectOAuth2LoginRequest RejectOAuth2Request
instance Consumes RejectOAuth2LoginRequest MimeJSON
instance Produces RejectOAuth2LoginRequest MimeJSON
rejectOAuth2LogoutRequest
:: LogoutChallenge
-> OryHydraRequest RejectOAuth2LogoutRequest MimeNoContent NoContent MimeNoContent
rejectOAuth2LogoutRequest :: LogoutChallenge
-> OryHydraRequest
RejectOAuth2LogoutRequest MimeNoContent NoContent MimeNoContent
rejectOAuth2LogoutRequest (LogoutChallenge Text
logoutChallenge) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/oauth2/auth/requests/logout/reject"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"logout_challenge", forall a. a -> Maybe a
Just Text
logoutChallenge)
data RejectOAuth2LogoutRequest
instance Produces RejectOAuth2LogoutRequest MimeNoContent
revokeOAuth2ConsentSessions
:: Subject
-> OryHydraRequest RevokeOAuth2ConsentSessions MimeNoContent NoContent MimeNoContent
revokeOAuth2ConsentSessions :: Subject
-> OryHydraRequest
RevokeOAuth2ConsentSessions MimeNoContent NoContent MimeNoContent
revokeOAuth2ConsentSessions (Subject Text
subject) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/admin/oauth2/auth/sessions/consent"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"subject", forall a. a -> Maybe a
Just Text
subject)
data RevokeOAuth2ConsentSessions
instance HasOptionalParam RevokeOAuth2ConsentSessions Client where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest RevokeOAuth2ConsentSessions contentType res accept
-> Client
-> OryHydraRequest
RevokeOAuth2ConsentSessions contentType res accept
applyOptionalParam OryHydraRequest RevokeOAuth2ConsentSessions contentType res accept
req (Client Text
xs) =
OryHydraRequest RevokeOAuth2ConsentSessions contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"client", forall a. a -> Maybe a
Just Text
xs)
instance HasOptionalParam RevokeOAuth2ConsentSessions All where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest RevokeOAuth2ConsentSessions contentType res accept
-> All
-> OryHydraRequest
RevokeOAuth2ConsentSessions contentType res accept
applyOptionalParam OryHydraRequest RevokeOAuth2ConsentSessions contentType res accept
req (All Bool
xs) =
OryHydraRequest RevokeOAuth2ConsentSessions contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"all", forall a. a -> Maybe a
Just Bool
xs)
instance Produces RevokeOAuth2ConsentSessions MimeNoContent
revokeOAuth2LoginSessions
:: Subject
-> OryHydraRequest RevokeOAuth2LoginSessions MimeNoContent NoContent MimeNoContent
revokeOAuth2LoginSessions :: Subject
-> OryHydraRequest
RevokeOAuth2LoginSessions MimeNoContent NoContent MimeNoContent
revokeOAuth2LoginSessions (Subject Text
subject) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"DELETE" [ByteString
"/admin/oauth2/auth/sessions/login"]
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> [QueryItem] -> OryHydraRequest req contentType res accept
`addQuery` forall a. ToHttpApiData a => (Method, Maybe a) -> [QueryItem]
toQuery (Method
"subject", forall a. a -> Maybe a
Just Text
subject)
data RevokeOAuth2LoginSessions
instance Produces RevokeOAuth2LoginSessions MimeNoContent
revokeOAuth2Token
:: (Consumes RevokeOAuth2Token MimeFormUrlEncoded)
=> Token
-> OryHydraRequest RevokeOAuth2Token MimeFormUrlEncoded NoContent MimeNoContent
revokeOAuth2Token :: Consumes RevokeOAuth2Token MimeFormUrlEncoded =>
Token
-> OryHydraRequest
RevokeOAuth2Token MimeFormUrlEncoded NoContent MimeNoContent
revokeOAuth2Token (Token Text
token) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/oauth2/revoke"]
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 AuthBasicBasic)
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)
forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"token", Text
token)
data RevokeOAuth2Token
instance HasOptionalParam RevokeOAuth2Token ClientId where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest RevokeOAuth2Token contentType res accept
-> ClientId
-> OryHydraRequest RevokeOAuth2Token contentType res accept
applyOptionalParam OryHydraRequest RevokeOAuth2Token contentType res accept
req (ClientId Text
xs) =
OryHydraRequest RevokeOAuth2Token contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"client_id", Text
xs)
instance HasOptionalParam RevokeOAuth2Token ClientSecret where
applyOptionalParam :: forall contentType res accept.
OryHydraRequest RevokeOAuth2Token contentType res accept
-> ClientSecret
-> OryHydraRequest RevokeOAuth2Token contentType res accept
applyOptionalParam OryHydraRequest RevokeOAuth2Token contentType res accept
req (ClientSecret Text
xs) =
OryHydraRequest RevokeOAuth2Token contentType res accept
req forall req contentType res accept.
OryHydraRequest req contentType res accept
-> Form -> OryHydraRequest req contentType res accept
`addForm` forall v. ToHttpApiData v => (Method, v) -> Form
toForm (Method
"client_secret", Text
xs)
instance Consumes RevokeOAuth2Token MimeFormUrlEncoded
instance Produces RevokeOAuth2Token MimeNoContent
setOAuth2Client
:: (Consumes SetOAuth2Client MimeJSON, MimeRender MimeJSON OAuth2Client)
=> OAuth2Client
-> Id
-> OryHydraRequest SetOAuth2Client MimeJSON OAuth2Client MimeJSON
setOAuth2Client :: (Consumes SetOAuth2Client MimeJSON,
MimeRender MimeJSON OAuth2Client) =>
OAuth2Client
-> Id
-> OryHydraRequest SetOAuth2Client MimeJSON OAuth2Client MimeJSON
setOAuth2Client OAuth2Client
oAuth2Client (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/clients/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id]
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 SetOAuth2Client
instance HasBodyParam SetOAuth2Client OAuth2Client
instance Consumes SetOAuth2Client MimeJSON
instance Produces SetOAuth2Client MimeJSON
setOAuth2ClientLifespans
:: (Consumes SetOAuth2ClientLifespans MimeJSON)
=> Id
-> OryHydraRequest SetOAuth2ClientLifespans MimeJSON OAuth2Client MimeJSON
setOAuth2ClientLifespans :: Consumes SetOAuth2ClientLifespans MimeJSON =>
Id
-> OryHydraRequest
SetOAuth2ClientLifespans MimeJSON OAuth2Client MimeJSON
setOAuth2ClientLifespans (Id Text
id) =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"PUT" [ByteString
"/admin/clients/",forall a. ToHttpApiData a => a -> ByteString
toPath Text
id,ByteString
"/lifespans"]
data SetOAuth2ClientLifespans
instance HasBodyParam SetOAuth2ClientLifespans OAuth2ClientTokenLifespans
instance Consumes SetOAuth2ClientLifespans MimeJSON
instance Produces SetOAuth2ClientLifespans MimeJSON
trustOAuth2JwtGrantIssuer0
:: (Consumes TrustOAuth2JwtGrantIssuer0 MimeJSON)
=> OryHydraRequest TrustOAuth2JwtGrantIssuer0 MimeJSON TrustedOAuth2JwtGrantIssuer MimeJSON
trustOAuth2JwtGrantIssuer0 :: Consumes TrustOAuth2JwtGrantIssuer0 MimeJSON =>
OryHydraRequest
TrustOAuth2JwtGrantIssuer0
MimeJSON
TrustedOAuth2JwtGrantIssuer
MimeJSON
trustOAuth2JwtGrantIssuer0 =
forall req contentType res accept.
Method
-> [ByteString] -> OryHydraRequest req contentType res accept
_mkRequest Method
"POST" [ByteString
"/admin/trust/grants/jwt-bearer/issuers"]
data TrustOAuth2JwtGrantIssuer0
instance HasBodyParam TrustOAuth2JwtGrantIssuer0 TrustOAuth2JwtGrantIssuer
instance Consumes TrustOAuth2JwtGrantIssuer0 MimeJSON
instance Produces TrustOAuth2JwtGrantIssuer0 MimeJSON