Download the PHP package vojtasvoboda/oc-codelogin-plugin without Composer

On this page you can find all versions of the php package vojtasvoboda/oc-codelogin-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package oc-codelogin-plugin

Code Login for OctoberCMS

Codacy Scrutinizer Coverage License

Login only by code or password. Create secret page or protect whole site just in minute. Tested with the latest stable OctoberCMS build 349.

Dependencies

RainLab.User plugin for users management.

How to create secret page

0) Install RainLab.User plugin and then VojtaSvoboda.CodeLogin plugin.

1) Insert RainLab.User Session component to layout which you want to protect by code.

Set Allow property only for Users (means logged users) and then set your login page. All guests will be redirect to login page.

Be sure you have injected JavaScript code and jQuery to your layout:

Framework extras tag is optional and this tag adds a CSS and JavaScript files that contain the loading indicator plugin and CSS classes for styling the loading indicator. The indicator is displayed on the top of the page when an AJAX request runs.

2) Create login page with Login layout and insert RainLab.User Session component and Code login form. Session component set to Allow only guest (login allowed only for guests). CodeLogin provide login form and session component will redirect user when already logged.

Set redirect parameter to your secret page and then set if you want to use input type text or input type password (code will not be visible).

3) Use default HTML or create own design by extending component template:

4) At RainLab.User plugin create as many users as you want. It's recommanded to use unique password for each user, because first user with matched password will be log!

5) [optional] If you want create logout page, just create logout.htm, insert session component allowed for logged user and with redirect to login page. To the template paste this code:

<a data-request="onLogout" class="btn" data-request-data="redirect: '/login'">Sign out</a>

6) [optional] For logging all user accesses use UserAccessLog plugin.

7) [optional] For creating more user accounts use User import/export plugin - just create simple XLS file with usernames and import it (passwords can be generated by Norton Password Generator).

Events

After successfull login you can use rainlab.user.login event to catch logged user instance:

Troubleshooting

Login button doesn't works.

Be sure you have included jQuery and {% framework extras %} code to your layout (not to page).

AJAX handler 'codeLogin::onCodesignin' was not found.

If form doesn't work, try to insert Code login component to page, not to partial. Login component should be placed beside to Session component.

Future plans

Feel free to send pullrequest!

License

Code login plugin is open-sourced software licensed under the MIT license same as OctoberCMS platform.

Contributing

Please send Pull Request to master branch.


All versions of oc-codelogin-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
composer/installers Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vojtasvoboda/oc-codelogin-plugin contains the following files

Loading the files please wait ....