diff options
Diffstat (limited to 'docs/source')
-rw-r--r-- | docs/source/api/client_register.rst | 2 | ||||
-rw-r--r-- | docs/source/index.rst | 5 | ||||
-rw-r--r-- | docs/source/plugindocs/basic_auth.rst | 2 | ||||
-rw-r--r-- | docs/source/plugindocs/openid.rst | 2 | ||||
-rw-r--r-- | docs/source/plugindocs/persona.rst | 2 | ||||
-rw-r--r-- | docs/source/pluginwriter/authhooks.rst | 86 | ||||
-rw-r--r-- | docs/source/siteadmin/deploying.rst | 16 | ||||
-rw-r--r-- | docs/source/siteadmin/relnotes.rst | 69 |
8 files changed, 175 insertions, 9 deletions
diff --git a/docs/source/api/client_register.rst b/docs/source/api/client_register.rst index 4ad7908e..08f92c47 100644 --- a/docs/source/api/client_register.rst +++ b/docs/source/api/client_register.rst @@ -49,7 +49,7 @@ redirect_uri Response -------- -You will get back a response:: +You will get back a response: client_id This identifies a client diff --git a/docs/source/index.rst b/docs/source/index.rst index cad3c033..75a5b66e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -56,9 +56,11 @@ Part 2: Core plugin documentation plugindocs/flatpagesfile plugindocs/sampleplugin - plugindocs/oauth plugindocs/trim_whitespace plugindocs/raven + plugindocs/basic_auth + plugindocs/openid + plugindocs/persona plugindocs/ldap @@ -76,6 +78,7 @@ This guide covers writing new GNU MediaGoblin plugins. pluginwriter/api pluginwriter/tests pluginwriter/media_type_hooks + pluginwriter/authhooks Part 4: Developer's Zone diff --git a/docs/source/plugindocs/basic_auth.rst b/docs/source/plugindocs/basic_auth.rst new file mode 100644 index 00000000..83492ac2 --- /dev/null +++ b/docs/source/plugindocs/basic_auth.rst @@ -0,0 +1,2 @@ +.. include:: ../../../mediagoblin/plugins/basic_auth/README.rst + diff --git a/docs/source/plugindocs/openid.rst b/docs/source/plugindocs/openid.rst new file mode 100644 index 00000000..045bf9d0 --- /dev/null +++ b/docs/source/plugindocs/openid.rst @@ -0,0 +1,2 @@ +.. include:: ../../../mediagoblin/plugins/openid/README.rst + diff --git a/docs/source/plugindocs/persona.rst b/docs/source/plugindocs/persona.rst new file mode 100644 index 00000000..2524127d --- /dev/null +++ b/docs/source/plugindocs/persona.rst @@ -0,0 +1,2 @@ +.. include:: ../../../mediagoblin/plugins/persona/README.rst + diff --git a/docs/source/pluginwriter/authhooks.rst b/docs/source/pluginwriter/authhooks.rst new file mode 100644 index 00000000..9721d729 --- /dev/null +++ b/docs/source/pluginwriter/authhooks.rst @@ -0,0 +1,86 @@ +====================== + Authentication Hooks +====================== + +This documents the hooks that are currently available for authentication +plugins. If you need new hooks for your plugin, go ahead a submit a patch. + +What hooks are available? +========================= + +'authentication' +---------------- + +This hook just needs to return ``True`` as this is how +the MediaGoblin app knows that an authentication plugin is enabled. + + +'auth_extra_validation' +----------------------- + +This hook is used to provide any additional validation of the registration +form when using ``mediagoblin.auth.tools.register_user()``. This hook runs +through all enabled auth plugins. + + +'auth_create_user' +------------------ + +This hook is used by ``mediagoblin.auth.tools.register_user()`` so plugins can +store the necessary information when creating a user. This hook runs through +all enabled auth plugins. + +'auth_get_user' +--------------- + +This hook is used by ``mediagoblin.auth.tools.check_login_simple()``. Your +plugin should return a ``User`` object given a username. + +'auth_no_pass_redirect' +----------------------- + +This hook is called in ``mediagoblin.auth.views`` in both the ``login`` and +``register`` views. This hook should return the name of your plugin, so that +if :ref:`basic_auth-chapter` is not enabled, the user will be redirected to the +correct login and registration views for your plugin. + +The code assumes that it can generate a valid url given +``mediagoblin.plugins.{{ your_plugin_here }}.login`` and +``mediagoblin.plugins.{{ your_plugin_here }}.register``. This is only needed if +you will not be using the ``login`` and ``register`` views in +``mediagoblin.auth.views``. + +'auth_get_login_form' +--------------------- + +This hook is called in ``mediagoblin.auth.views.login()``. If you are not using +that view, then you do not need this hook. This hook should take a ``request`` +object and return the ``LoginForm`` for your plugin. + +'auth_get_registration_form' +---------------------------- + +This hook is called in ``mediagoblin.auth.views.register()``. If you are not +using that view, then you do not need this hook. This hook should take a +``request`` object and return the ``RegisterForm`` for your plugin. + +'auth_gen_password_hash' +------------------------ + +This hook should accept a ``raw_pass`` and an ``extra_salt`` and return a +hashed password to be stored in ``User.pw_hash``. + +'auth_check_password' +--------------------- + +This hook should accept a ``raw_pass``, a ``stored_hash``, and an ``extra_salt``. +Your plugin should then check that the ``raw_pass`` hashes to the same thing as +the ``stored_hash`` and return either ``True`` or ``False``. + +'auth_fake_login_attempt' +------------------------- + +This hook is called in ``mediagoblin.auth.tools.check_login_simple``. It is +called if a user is not found and should do something that takes the same amount +of time as your ``check_password`` function. This is to help prevent timining +attacks. diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst index 6123dc9e..de4ce1ac 100644 --- a/docs/source/siteadmin/deploying.rst +++ b/docs/source/siteadmin/deploying.rst @@ -203,18 +203,20 @@ Clone the MediaGoblin repository and set up the git submodules:: cd mediagoblin git submodule init && git submodule update -Set up the in-package virtualenv via make:: - ./bootstrap.sh && ./configure && make +And set up the in-package virtualenv:: + + (virtualenv --system-site-packages . || virtualenv .) && ./bin/python setup.py develop .. note:: - Prefer not to use make, or want to use the "old way" of installing - MediaGoblin (maybe you know how to use virtualenv and python - packaging)? You still can! All that the above make script is doing - is installing an in-package virtualenv and running + We presently have an experimental make-style deployment system. if + you'd like to try it, instead of the above command, you can run:: + + ./bootstrap.sh && ./configure && make - ./bin/python setup.py develop + This also includes a number of nice features, such as keeping your + viratualenv up to date by simply running `make update`. .. :: diff --git a/docs/source/siteadmin/relnotes.rst b/docs/source/siteadmin/relnotes.rst index 72fcb3d4..8f34e145 100644 --- a/docs/source/siteadmin/relnotes.rst +++ b/docs/source/siteadmin/relnotes.rst @@ -22,6 +22,74 @@ If you're upgrading from a previous release, please read it carefully, or at least skim over it. +0.5.0 +===== + +**NOTE:** If using the API is important to you, we're in a state of +ransition towards a new API via the Pump API. As such, though the old +API still probably works, some changes have happened to the way oauth +works to make it more Pump-compatible. If you're heavily using +clients using the old API, you may wish to hold off on upgrading for +now. Otherwise, jump in and have fun! :) + +**Do this to upgrade** + +1. Make sure to run + ``./bin/python setup.py develop --upgrade && ./bin/gmg dbupdate`` + after upgrading. + +.. mention something about new, experimental configure && make support + +2. Note that a couple of things have changed with ``mediagoblin.ini``. First + we have a new Authentication System. You need to add + ``[[mediagoblin.plugins.basic_auth]]`` under the ``[plugins]`` section of + your config file. Second, media types are now plugins, so you need to add + each media type under the ``[plugins]`` section of your config file. + + +3. We have made a script to transition your ``mediagoblin_local.ini`` file for + you. This script can be found at + +.. add a link to the script + +If you run into problems, don't hesitate to +`contact us <http://mediagoblin.org/pages/join.html>`_ +(IRC is often best). + +**New features** + +* As mentioned above, we now have a plugable Authentication system. You can + use any combination of the multiple authentication systems + (:ref:`basic_auth-chapter`, :ref:`persona-chapter`, :ref:`openid-chapter`) + or write your own! +* Media types are now plugins! This means that new media types will + be able to do new, fancy things they couldn't in the future. +* We now have notification support! This allows you to subscribe to media + comments and to be notified when someone comments on your media. +* New reprocessing framework! You can now reprocess failed uploads, and + send already processed media back to processing to re-transcode or resize + media. +* Comment preview! +* Users now have the ability to change their email associated with their + account. +* New oauth code as we move closer to federation support. +* Experimental pyconfigure support for GNU-style configue and makefile + deployment. +* Database foundations! You can now pre-populate the database models. +* Way faster unit test run-time via in-memory database. +* All mongokit stuff has been cleaned up. +* Fixes for non-ascii filenames. +* The option to stay logged in. +* Mediagoblin has been upgraded to use the latest `celery <http://celeryproject.org/>`_ + version. +* You can now add jinja2 extensions to your config file to use in custom + templates. +* Fixed video permission issues. +* Mediagoblin docs are now hosted with multiple versions. +* We removed redundent tooltips from the STL media display. +* We are now using itsdangerous for verification tokens. + + 0.4.1 ===== @@ -80,6 +148,7 @@ please note the following: **New features** + * PDF media type! * Improved plugin system. More flexible, better documented, with a new plugin authoring section of the docs. |