Skip to main content
Release file added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

pyramid_contextauth

https://travis-ci.org/hadrien/pyramid_contextauth.png https://coveralls.io/repos/hadrien/pyramid_contextauth/badge.png https://pypip.in/d/pyramid_contextauth/badge.png

A simple pyramid extension to register contexts based authentication policy. Introspectables for policies registered are added to configuration and will appear in debugtoolbar with their associated contexts.

from pyramid.security import remember, forget
from pyramid.authentication import AuthTktAuthenticationPolicy

def includeme(config):
    config.include('pyramid_contextauth')
    config.register_authentication_policy(
        AuthTktAuthenticationPolicy('secret'),
        Context1,
    )
    config.register_authentication_policy(
        ContextAuthenticationPolicy(),
        (Context2, Context3),
    )


class Context1(object):
    pass


class Context2(object):
    pass


class Context3(object):
    pass


class ContextAuthenticationPolicy(object):

    def authenticated_userid(self, request):
        return unauthenticated_userid(request)

    def unauthenticated_userid(self, request):
        "A dummy example"
        return request.POST.get('userid')

    def effective_principals(self, request):
        if self.unauthenticated_userid(request):
            return ['User']
        return []

    def remember(self, request, prinicpal, **kw):
        return remember(request, prinicpal, **kw)

    def forget(self, request):
        return forget(request)

Changelog

0.7

  • Policy checks on each resource lineage and get the first policy it gets.

  • Add coverall in after_success of travis config.

  • Remove pyramid version constraints.

0.6

  • Removing decorator authentication_policy: extension should not instantiate authentication policy class internally.

0.5

  • Registering same context to multiple policies raises a configuration error.

  • Unregister old policy when overriding a context with another policy.

  • Change register_authentication_policy and authentication_policy signatures.

0.4

  • Add introspectables to config for registered authentication policies.

  • Rename register_context to register_policy

0.3

  • Break backward compatibility as ContextBasedAuthenticationPolicy.register_context now requires config instance as first argument.

  • Add config.register_authentication_policy configuration directive which accepts a list of contexts.

  • Use registry adpaters to register policies rather than a dict.

  • Add a decorator authentication_policy to register policies when doing a config scan.

0.2.1

  • Adjust requirements files and dependencies.

0.2

  • Update dependencies by adding requirements files.

0.1.1

  • Changed register_context interface which breaks compatibility with 0.0.3

0.0.3

  • Commit configuration before returning from includeme.

0.0.2

  • When not provided, authenticated_userid and effective_principals from super class CallbackAuthenticationPolicy are used.

0.0.1

  • Initial version

Metadata

Release files for pyramid_contextauth 0.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for pyramid_contextauth 0.7.3
File Size Uploaded Provenance Actions
pyramid_contextauth-0.7.3.tar.gz 4.6 kB File added late: Without provenance Details for pyramid_contextauth-0.7.3.tar.gz

Release files / pyramid_contextauth-0.7.3.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL pyramid_contextauth-0.7.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5bc136529a38c7cea48e55f0c93df44193865f1ad7c7ecac19827197aac54a73
BLAKE2b-256 checksum
How to use checksums
acfb5dc1d3f9f70e75ffc2131dcc70730e6279fdc62fe7b0a0f05e5dac0aebf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyramid_contextauth 0.7.3

Upload timing

Release file added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.


Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page