hscim-0.4.0.4: hscim json schema and server implementation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Web.Scim.Class.Auth

Description

HTTP authentication support. Can be used with basic auth, token-based auth, or something else (though OAuth is likely not implementable with this API).

Synopsis

Documentation

class AuthTypes tag Source #

Types used in authentication routines.

Associated Types

type AuthData tag Source #

The type that the “Authorization” header will be parsed as. This info will be given to authCheck.

type AuthInfo tag Source #

The result of performing authentication.

Can be () to handle just authorized/non-authorized, or something more complex – for instance, if the auth header provides a token that may or may not correspond to a particular organization, then the result could be the ID of that organization).

Instances

Instances details
AuthTypes Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

Associated Types

type AuthData Mock Source #

type AuthInfo Mock Source #

AuthTypes (TestTag id authData authInfo userExtra) Source # 
Instance details

Defined in Web.Scim.Test.Util

Associated Types

type AuthData (TestTag id authData authInfo userExtra) Source #

type AuthInfo (TestTag id authData authInfo userExtra) Source #

class (AuthTypes tag, FromHttpApiData (AuthData tag)) => AuthDB tag m where Source #

An interface that has to be implemented for a server to provide authentication.

Methods

authCheck :: Maybe (AuthData tag) -> ScimHandler m (AuthInfo tag) Source #

Do authentication or throw an error in ScimHandler (e.g. unauthorized) if the provided credentials are invalid or don't correspond to any user.

Instances

Instances details
AuthDB Mock TestServer Source # 
Instance details

Defined in Web.Scim.Server.Mock