wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.Public.Brig.OAuth

Documentation

type OAuthAPI = Named "get-oauth-client" (Summary "Get OAuth client information" :> (CanThrow 'OAuthFeatureDisabled :> (CanThrow 'OAuthClientNotFound :> (ZLocalUser :> ("oauth" :> ("clients" :> (Capture' '[Description "The ID of the OAuth client"] "OAuthClientId" OAuthClientId :> MultiVerb 'GET '[JSON] '[ErrorResponse 'OAuthClientNotFound, Respond 200 "OAuth client found" OAuthClient] (Maybe OAuthClient)))))))) :<|> (Named "create-oauth-auth-code" (Summary "Create an OAuth authorization code" :> (Description "Currently only supports the 'code' response type, which corresponds to the authorization code flow." :> (ZLocalUser :> ("oauth" :> ("authorization" :> ("codes" :> (ReqBody '[JSON] CreateOAuthAuthorizationCodeRequest :> MultiVerb 'POST '[JSON] CreateOAuthAuthorizationCodeResponses CreateOAuthCodeResponse))))))) :<|> (Named "create-oauth-access-token" (Summary "Create an OAuth access token" :> (Description "Obtain a new access token from an authorization code or a refresh token." :> (CanThrow 'OAuthJwtError :> (CanThrow 'OAuthAuthorizationCodeNotFound :> (CanThrow 'OAuthClientNotFound :> (CanThrow 'OAuthFeatureDisabled :> (CanThrow 'OAuthInvalidRefreshToken :> (CanThrow 'OAuthInvalidGrantType :> (CanThrow 'OAuthInvalidClientCredentials :> (CanThrow 'OAuthInvalidGrant :> ("oauth" :> ("token" :> (ReqBody '[FormUrlEncoded] (Either OAuthAccessTokenRequest OAuthRefreshAccessTokenRequest) :> Post '[JSON] OAuthAccessTokenResponse))))))))))))) :<|> (Named "revoke-oauth-refresh-token" (Summary "Revoke an OAuth refresh token" :> (Description "Revoke an access token." :> (CanThrow 'OAuthJwtError :> (CanThrow 'OAuthInvalidRefreshToken :> (CanThrow 'OAuthClientNotFound :> ("oauth" :> ("revoke" :> (ReqBody '[JSON] OAuthRevokeRefreshTokenRequest :> Post '[JSON] ())))))))) :<|> (Named "get-oauth-applications" (Summary "Get OAuth applications with account access" :> (Description "Get all OAuth applications with active account access for a user." :> (ZLocalUser :> ("oauth" :> ("applications" :> MultiVerb1 'GET '[JSON] (Respond 200 "OAuth applications found" [OAuthApplication])))))) :<|> (Named "revoke-oauth-account-access-v6" (Summary "Revoke account access from an OAuth application" :> (ZLocalUser :> (Until 'V7 :> ("oauth" :> ("applications" :> (Capture' '[Description "The ID of the OAuth client"] "OAuthClientId" OAuthClientId :> MultiVerb 'DELETE '[JSON] '[RespondEmpty 204 "OAuth application access revoked"] ())))))) :<|> (Named "revoke-oauth-account-access" (Summary "Revoke account access from an OAuth application" :> (CanThrow 'AccessDenied :> (ZLocalUser :> (From 'V7 :> ("oauth" :> ("applications" :> (Capture' '[Description "The ID of the OAuth client"] "OAuthClientId" OAuthClientId :> ("sessions" :> (ReqBody '[JSON] PasswordReqBody :> MultiVerb 'DELETE '[JSON] '[RespondEmpty 204 "OAuth application access revoked"] ()))))))))) :<|> Named "delete-oauth-refresh-token" (Summary "Revoke an active OAuth session" :> (Description "Revoke an active OAuth session by providing the refresh token ID." :> (ZLocalUser :> (CanThrow 'AccessDenied :> (CanThrow 'OAuthClientNotFound :> ("oauth" :> ("applications" :> (Capture' '[Description "The ID of the OAuth client"] "OAuthClientId" OAuthClientId :> ("sessions" :> (Capture' '[Description "The ID of the refresh token"] "RefreshTokenId" OAuthRefreshTokenId :> (ReqBody '[JSON] PasswordReqBody :> Delete '[JSON] ()))))))))))))))))) Source #