-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | API client for . -- -- This is an API client library for interacting with Smith. @package smith-client @version 0.0.1 -- | Smith certificate data types. module Smith.Client.Data.Certificate newtype Certificate Certificate :: Text -> Certificate [getCertificate] :: Certificate -> Text instance GHC.Show.Show Smith.Client.Data.Certificate.Certificate instance GHC.Classes.Ord Smith.Client.Data.Certificate.Certificate instance GHC.Classes.Eq Smith.Client.Data.Certificate.Certificate -- | Smith certificate authority data types. module Smith.Client.Data.CertificateAuthority newtype AuthorityPublicKey AuthorityPublicKey :: Text -> AuthorityPublicKey [getAuthorityPublicKey] :: AuthorityPublicKey -> Text instance GHC.Show.Show Smith.Client.Data.CertificateAuthority.AuthorityPublicKey instance GHC.Classes.Ord Smith.Client.Data.CertificateAuthority.AuthorityPublicKey instance GHC.Classes.Eq Smith.Client.Data.CertificateAuthority.AuthorityPublicKey -- | Smith environment data types. module Smith.Client.Data.Environment newtype Environment Environment :: Text -> Environment [getEnvironment] :: Environment -> Text instance GHC.Show.Show Smith.Client.Data.Environment.Environment instance GHC.Classes.Ord Smith.Client.Data.Environment.Environment instance GHC.Classes.Eq Smith.Client.Data.Environment.Environment -- | Smith certificate request data types. module Smith.Client.Data.CertificateRequest newtype Principal Principal :: Text -> Principal [getPrincipal] :: Principal -> Text newtype PublicKey PublicKey :: Text -> PublicKey [getPublicKey] :: PublicKey -> Text newtype HostName HostName :: Text -> HostName [getHostName] :: HostName -> Text data CertificateRequest CertificateRequest :: PublicKey -> [Principal] -> Environment -> Maybe HostName -> CertificateRequest [certificateRequestPublicKey] :: CertificateRequest -> PublicKey [certificateRequestPrincipals] :: CertificateRequest -> [Principal] [certificateRequestEnvironment] :: CertificateRequest -> Environment [certificateRequestHostName] :: CertificateRequest -> Maybe HostName instance GHC.Show.Show Smith.Client.Data.CertificateRequest.CertificateRequest instance GHC.Classes.Ord Smith.Client.Data.CertificateRequest.CertificateRequest instance GHC.Classes.Eq Smith.Client.Data.CertificateRequest.CertificateRequest instance GHC.Show.Show Smith.Client.Data.CertificateRequest.HostName instance GHC.Classes.Ord Smith.Client.Data.CertificateRequest.HostName instance GHC.Classes.Eq Smith.Client.Data.CertificateRequest.HostName instance GHC.Show.Show Smith.Client.Data.CertificateRequest.PublicKey instance GHC.Classes.Ord Smith.Client.Data.CertificateRequest.PublicKey instance GHC.Classes.Eq Smith.Client.Data.CertificateRequest.PublicKey instance GHC.Show.Show Smith.Client.Data.CertificateRequest.Principal instance GHC.Classes.Ord Smith.Client.Data.CertificateRequest.Principal instance GHC.Classes.Eq Smith.Client.Data.CertificateRequest.Principal -- | Smith identity data types. module Smith.Client.Data.Identity newtype IdentityId IdentityId :: Text -> IdentityId [identityId] :: IdentityId -> Text instance GHC.Show.Show Smith.Client.Data.Identity.IdentityId instance GHC.Classes.Ord Smith.Client.Data.Identity.IdentityId instance GHC.Classes.Eq Smith.Client.Data.Identity.IdentityId -- | Smith client configuration data and functions. module Smith.Client.Config data Smith Smith :: SmithEndpoint -> Manager -> Store -> Smith newtype SmithEndpoint SmithEndpoint :: Text -> SmithEndpoint [getSmithEndpoint] :: SmithEndpoint -> Text data SmithCredentialsType EnvironmentCredentials :: SmithCredentialsType SmithHomeCredentials :: FilePath -> SmithCredentialsType HomeCredentials :: FilePath -> SmithCredentialsType SuppliedCredentials :: SmithCredentialsType data SmithCredentials SmithCredentials :: SmithCredentialsType -> IdentityId -> JWK -> SmithCredentials data SmithScope ProfileScope :: SmithScope CAScope :: SmithScope configure :: IO (Either SmithConfigureError Smith) configureWith :: [SmithScope] -> Manager -> IO (Either SmithConfigureError Smith) configureT :: ExceptT SmithConfigureError IO Smith configureWithT :: [SmithScope] -> Manager -> ExceptT SmithConfigureError IO Smith configureEndpoint :: IO SmithEndpoint configureOAuth2 :: Manager -> SmithEndpoint -> [Scope] -> JWK -> IdentityId -> IO Store configureCredentials :: ExceptT SmithConfigureError IO SmithCredentials configureCredentialsByteString :: SmithCredentialsType -> ByteString -> ExceptT SmithConfigureError IO SmithCredentials configureCredentialsFile :: SmithCredentialsType -> FilePath -> ExceptT SmithConfigureError IO SmithCredentials data SmithConfigureError SmithConfigureCredentialsNotFound :: SmithCredentialsType -> SmithConfigureError SmithConfigureJsonDecodeError :: SmithCredentialsType -> SmithConfigureError SmithConfigureJwkDecodeError :: SmithCredentialsType -> SmithConfigureError SmithConfigureIdentityIdDecodeError :: SmithCredentialsType -> SmithConfigureError renderSmithConfigureError :: SmithConfigureError -> Text instance GHC.Show.Show Smith.Client.Config.SmithConfigureError instance GHC.Classes.Ord Smith.Client.Config.SmithConfigureError instance GHC.Classes.Eq Smith.Client.Config.SmithConfigureError instance GHC.Enum.Bounded Smith.Client.Config.SmithScope instance GHC.Enum.Enum Smith.Client.Config.SmithScope instance GHC.Show.Show Smith.Client.Config.SmithScope instance GHC.Classes.Ord Smith.Client.Config.SmithScope instance GHC.Classes.Eq Smith.Client.Config.SmithScope instance GHC.Show.Show Smith.Client.Config.SmithCredentials instance GHC.Classes.Eq Smith.Client.Config.SmithCredentials instance GHC.Show.Show Smith.Client.Config.SmithCredentialsType instance GHC.Classes.Ord Smith.Client.Config.SmithCredentialsType instance GHC.Classes.Eq Smith.Client.Config.SmithCredentialsType instance GHC.Show.Show Smith.Client.Config.SmithEndpoint instance GHC.Classes.Ord Smith.Client.Config.SmithEndpoint instance GHC.Classes.Eq Smith.Client.Config.SmithEndpoint -- | Smith user data types. module Smith.Client.Data.User newtype UserInfo UserInfo :: Text -> UserInfo [userInfo] :: UserInfo -> Text instance GHC.Show.Show Smith.Client.Data.User.UserInfo instance GHC.Classes.Ord Smith.Client.Data.User.UserInfo instance GHC.Classes.Eq Smith.Client.Data.User.UserInfo -- | Smith API errors, these represent application, authn/authz and network -- errors that can occur when making actual requests to the Smith API. module Smith.Client.Error data SmithError SmithApplicationError :: ErrorCode -> Maybe ErrorMessage -> SmithError SmithAuthorizationError :: ErrorCode -> Maybe ErrorMessage -> SmithError SmithAuthenticationError :: GrantError -> SmithError SmithResponseParseError :: Int -> ByteString -> Text -> SmithError SmithStatusCodeError :: Int -> ByteString -> SmithError SmithUrlParseError :: Text -> SmithError newtype ErrorCode ErrorCode :: Text -> ErrorCode [getErrorCode] :: ErrorCode -> Text newtype ErrorMessage ErrorMessage :: Text -> ErrorMessage [getErrorMessage] :: ErrorMessage -> Text instance GHC.Show.Show Smith.Client.Error.SmithError instance GHC.Classes.Eq Smith.Client.Error.SmithError instance GHC.Show.Show Smith.Client.Error.ErrorMessage instance GHC.Classes.Ord Smith.Client.Error.ErrorMessage instance GHC.Classes.Eq Smith.Client.Error.ErrorMessage instance GHC.Show.Show Smith.Client.Error.ErrorCode instance GHC.Classes.Ord Smith.Client.Error.ErrorCode instance GHC.Classes.Eq Smith.Client.Error.ErrorCode -- | Smith JSON representiation decoders. module Smith.Client.Serial.Decode userinfo :: Value -> Parser UserInfo certificate :: Value -> Parser Certificate authorityPublicKeys :: Value -> Parser [AuthorityPublicKey] errored :: Value -> Parser SmithError forbidden :: Value -> Parser SmithError parse :: (Value -> Parser a) -> ByteString -> Either Text a -- | Smith API definition response combinators. -- -- You shouldn't need these unless defining custom/additional calls, see -- Api for complete API definition. module Smith.Client.Response data ResponseError ParseResponseError :: Int -> ByteString -> Text -> ResponseError UnknownStatusResponseError :: Int -> ByteString -> ResponseError newtype Responder a Responder :: (Response ByteString -> Either SmithError a) -> Responder a [runResponder] :: Responder a -> Response ByteString -> Either SmithError a json :: Int -> (Value -> Parser a) -> Responder a instance GHC.Show.Show Smith.Client.Response.ResponseError instance GHC.Classes.Ord Smith.Client.Response.ResponseError instance GHC.Classes.Eq Smith.Client.Response.ResponseError -- | Smith API definition request combinators. -- -- You shouldn't need these unless defining custom/additional calls, see -- Api for complete API definition. module Smith.Client.Request data Request a Request :: StdMethod -> Text -> Responder a -> Requester -> Request a [requestMethod] :: Request a -> StdMethod [requestPath] :: Request a -> Text [requestResponder] :: Request a -> Responder a [requestRequester] :: Request a -> Requester newtype Requester Requester :: (Request -> Request) -> Requester [runRequester] :: Requester -> Request -> Request none :: Requester json :: Value -> Requester -- | Smith HTTP interactions. -- -- Should be used as a qualified import from top-level module: -- --
--   import qualified Smith.Client as Smith
--   
-- -- Example: > Smith.runRequest configuration Smith.userinfo module Smith.Client.Network -- | Takes Smith runtime data, and an API request definition and actually -- runs the request. Results are in IO and the error cases handled -- explicitly. runRequest :: Smith -> Request a -> IO (Either SmithError a) -- | Takes Smith runtime data, and an API request definition and actually -- runs the request. Results are embeded in ExceptT for convenience. runRequestT :: Smith -> Request a -> ExceptT SmithError IO a -- | Smith JSON representiation encoders. module Smith.Client.Serial.Encode certificateRequest :: CertificateRequest -> Value -- | Smith API definitions. -- -- Should be used as a qualified import from top-level module: -- --
--   import qualified Smith.Client as Smith
--   
-- -- Example: > Smith.runRequest configuration Smith.userinfo module Smith.Client.Api -- | Obtain the identity information of the currently authenticated user or -- service. userinfo :: Request UserInfo -- | Issue a certificate for the specified request details. issue :: CertificateRequest -> Request Certificate -- | Obtain all CA public keys for the specified environment. keys :: Environment -> Request [AuthorityPublicKey] -- | Smith Client top-level module. -- -- Designed to be import qualified: -- --
--   import qualified Smith.Client as Smith
--   
module Smith.Client data Smith Smith :: SmithEndpoint -> Manager -> Store -> Smith data SmithScope ProfileScope :: SmithScope CAScope :: SmithScope configure :: IO (Either SmithConfigureError Smith) configureWith :: [SmithScope] -> Manager -> IO (Either SmithConfigureError Smith) configureT :: ExceptT SmithConfigureError IO Smith configureWithT :: [SmithScope] -> Manager -> ExceptT SmithConfigureError IO Smith data SmithConfigureError SmithConfigureCredentialsNotFound :: SmithCredentialsType -> SmithConfigureError SmithConfigureJsonDecodeError :: SmithCredentialsType -> SmithConfigureError SmithConfigureJwkDecodeError :: SmithCredentialsType -> SmithConfigureError SmithConfigureIdentityIdDecodeError :: SmithCredentialsType -> SmithConfigureError renderSmithConfigureError :: SmithConfigureError -> Text -- | Takes Smith runtime data, and an API request definition and actually -- runs the request. Results are in IO and the error cases handled -- explicitly. runRequest :: Smith -> Request a -> IO (Either SmithError a) -- | Takes Smith runtime data, and an API request definition and actually -- runs the request. Results are embeded in ExceptT for convenience. runRequestT :: Smith -> Request a -> ExceptT SmithError IO a