{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.IdentityToolkit.RelyingParty.VerifyCustomToken
(
RelyingPartyVerifyCustomTokenResource
, relyingPartyVerifyCustomToken
, RelyingPartyVerifyCustomToken
, rpvctPayload
) where
import Network.Google.IdentityToolkit.Types
import Network.Google.Prelude
type RelyingPartyVerifyCustomTokenResource =
"identitytoolkit" :>
"v3" :>
"relyingparty" :>
"verifyCustomToken" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
IdentitytoolkitRelyingPartyVerifyCustomTokenRequest
:> Post '[JSON] VerifyCustomTokenResponse
newtype RelyingPartyVerifyCustomToken = RelyingPartyVerifyCustomToken'
{ _rpvctPayload :: IdentitytoolkitRelyingPartyVerifyCustomTokenRequest
} deriving (Eq,Show,Data,Typeable,Generic)
relyingPartyVerifyCustomToken
:: IdentitytoolkitRelyingPartyVerifyCustomTokenRequest
-> RelyingPartyVerifyCustomToken
relyingPartyVerifyCustomToken pRpvctPayload_ =
RelyingPartyVerifyCustomToken'
{ _rpvctPayload = pRpvctPayload_
}
rpvctPayload :: Lens' RelyingPartyVerifyCustomToken IdentitytoolkitRelyingPartyVerifyCustomTokenRequest
rpvctPayload
= lens _rpvctPayload (\ s a -> s{_rpvctPayload = a})
instance GoogleRequest RelyingPartyVerifyCustomToken
where
type Rs RelyingPartyVerifyCustomToken =
VerifyCustomTokenResponse
type Scopes RelyingPartyVerifyCustomToken =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient RelyingPartyVerifyCustomToken'{..}
= go (Just AltJSON) _rpvctPayload
identityToolkitService
where go
= buildClient
(Proxy ::
Proxy RelyingPartyVerifyCustomTokenResource)
mempty