通过AAF快速连接进行身份验证

ckanext-aaf的Python项目详细描述


https://travis-ci.org/Psykar/ckanext-aaf.svg?branch=masterhttps://coveralls.io/repos/github/Psykar/ckanext-aaf/badge.svgDownloadsLatest VersionSupported Python versionsDevelopment StatusLicense

ckanext aaf

允许AAF(澳大利亚访问联合会)身份验证登录到CKAN安装。

要求

测试与ckan 2.5.1,应该是相当容易跨版本的端口,因为代码库是相当小-公关的欢迎! 需要设置AAF“快速连接”应用程序(请参见https://rapid.aaf.edu.au/https://rapid.test.aaf.edu.au/) 对于实时安装,将需要SSL(因为AAF不允许回调到非SSL URL)

安装

要安装ckanext aaf:

  1. 激活您的CKAN虚拟环境,例如:

    . /usr/lib/ckan/default/bin/activate
    
  2. 将ckanext aaf python包安装到虚拟环境中:

    pip install ckanext-aaf
    
  3. aaf添加到CKAN中的ckan.plugins设置 配置文件(默认情况下,配置文件位于 /etc/ckan/default/production.ini

  4. 设置配置设置(如下所述),用于解码AAF传回的JWT令牌。

  5. 重启CKAN例如,如果您在Ubuntu上使用Apache部署了CKAN:

    sudo service apache2 reload
    

配置设置

这些设置是必需的(以下设置不起作用,请注册您自己的应用程序!):

# The unique URL given by AAF Rapid Connect (get one from rapid.aaf.edu.au or rapid.test.aaf.edu.au)
ckanext.aaf.url = https://rapid.aaf.edu.au/jwt/authnrequest/research/xxxxyyyzzzz
# The secret used to set up the above URL
ckanext.aaf.secret = asdfasdf#$#$#$asdfasdf
# The URL of your application, as provided to Rapid Connect (doesn't have to match the callback URL)
# Note this must match *exactly* what was provided to Rapid Connect - check the trailing slash!
ckanext.aaf.aud = http://myappurl.edu.au

这些设置是可选的:

# Enables use of aaf's test rapid connect service https://rapid.test.aaf.edu.au
# (defaults to using the live one https://rapid.aaf.edu.au )
ckanext.aaf.debug = False
# Allows overriding of 'ckan.auth.create_user_via_web' so that AAF users can be
# created even if normal registrations are disabled. Defaults to False
ckanext.aaf.allow_creation_always = False

开发安装

要安装ckanext aaf进行开发,请激活ckan virtualenv并 做:

git clone https://github.com/Psykar/ckanext-aaf.git
cd ckanext-aaf
pip install -e .
pip install -r dev-requirements.txt

运行测试

要运行测试,请执行:

nosetests --nologcapture --with-pylons=test.ini

要运行测试并生成覆盖率报告,首先确保 在virtualenv(pip install coverage)中安装的覆盖率,然后运行:

nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.aaf --cover-inclusive --cover-erase --cover-tests

发布新版ckanext aaf

ckanext aaf在PyPI上可用作https://pypi.python.org/pypi/ckanext-aaf。 要将新版本发布到pypi,请执行以下步骤:

  1. 更新setup.py文件中的版本号。 见PEP 440 如何选择版本号。

  2. 创建新版本的源发行版:

    python setup.py sdist
    
  3. 将源分发上载到pypi:

    python setup.py sdist upload
    
  4. 在github上标记项目的新版本,版本号为 setup.py文件。例如,setup.py中的版本号是 0.0.2然后:

    git tag -a 0.0.2
    git push --tags
    

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用McClickListener单击了什么元素   Java时间戳在Oracle时间戳中不同情况下存储12 PM的奇怪行为   java无法使用事件总线对运行在不同机器上的垂直体进行通信   java Mockserver:收到请求后进行回调   java无法将Json字符串转换为Map<string,Object>   java如何按升序排列输出?   java视图行,带有oracle键。jbo。在SrCategoryParentIterator中找不到键[300100120394155]   javafxmysql连接示例   java正在等待加载完成   java是否可以将同一个有状态会话bean实例注入多个其他会话bean?   java无法让万向节检测离开或进入区域   使用JavaCV和OpenCV的java提供了dyld:lazy符号绑定失败:找不到符号:__sincos_stret   xml解析无法使用Java读取xml文档   java无法更改工具栏的颜色   javaapachesshd和JSCH   java无法在firebase存储中检索图像url   java问题与executeUpdate   同一应用程序中不同活动之间的java SharedReference