Curator.SessionKeeper v0.1.0 Curator.SessionKeeper.Plug.EnsureNotAuthenticated

This plug ensures that no claims have been verified on the request.

If they’re found, the already_authenticated/2 function is invoked with the Plug.Conn.t object and its params.

Example

# Will call the already_authenticated/2 function on your handler
plug Curator.SessionKeeper.Plug.EnsureNotAuthenticated, handler: SomeModule

# look in the :secret location.  You can also do simple claim checks:
plug Curator.SessionKeeper.Plug.EnsureNotAuthenticated, handler: SomeModule,
                                           key: :secret

If the handler option is not passed, Curator.SessionKeeper.Plug.ErrorHandler will provide the default behavior.