gws.plugin.auth_method.token

HTTP Token authorisation method.

The token authorization works by passing a token in an HTTP header. For example, with this configuration:

auth.methods+ {
    type "token"
    header "X-My-Auth"
    prefix "Bearer"

}

the application would expect a header like X-My-Auth: Bearer <token>, extract the token value and pass it along to authorization providers.

Source code: gws.plugin.auth_method.token

Package Contents

class gws.plugin.auth_method.token.Config

Bases: gws.base.auth.method.Config

HTTP-token authorization options (added in 8.1)

header: str

HTTP header name

prefix: str = ''

token prefix

class gws.plugin.auth_method.token.Object

Bases: gws.base.auth.method.Object

header: str
prefix: str
close_session(req, res)
configure()
enter_middleware(req)
exit_middleware(req, res)
open_session(req)