Download the PHP package ekreative/redmine_login without Composer

On this page you can find all versions of the php package ekreative/redmine_login. 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 redmine_login

Redmine Login

Latest Stable Version License Build Status SensioLabsInsight Coverage Status

Install

composer require ekreative/redmine_login

Kernel

new Ekreative\RedmineLoginBundle\EkreativeRedmineLoginBundle()

Parameters

parameters:
    redmine: 'http://www.redmine.org'

Config

ekreative_redmine_login:
    redmine: %redmine%

Routing

ekreative_redmine_login:
    resource: "@EkreativeRedmineLoginBundle/Resources/config/routing.yml"

Security

security:

    providers:
        webservice:
            id: ekreative_redmine_login.provider

    firewalls:
        unsec:
            pattern: ^/login$
            security: false

        secured_area:
            pattern: ^/
            anonymous:
            simple_form:
                authenticator: ekreative_redmine_login.authenticator
                check_path:    login_check
                login_path:    login
                username_parameter: login[username]
                password_parameter: login[password]
            simple_preauth:
                authenticator: ekreative_redmine_login.api_authenticator
            logout:
                path: /logout

    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/, roles: ROLE_REDMINE }

Security

You can secure your own routes using two roles

Make Request

$projects = json_decode($this->get('ekreative_redmine_login.client_provider')->get($this->getUser())->get('projects.json')->getBody(), true)['projects']

Login as api user

POST /login HTTP/1.1
Content-Type: application/json

{
    "login": {
        "username": "username",
        "password": "password"
    }
}

Response

200 OK

{
  "user": {
    "id": 1,
    "username": "username",
    "firstName": "Name",
    "lastName": "Last",
    "email": "[email protected]",
    "createdAt": "2000-01-01T00:00:00+00:00",
    "lastLoginAt": "2000-01-01T00:00:00+00:00",
    "apiKey": "your_api_key",
    "status": 1
  }
}

Logged in:

GET /admin HTTP/1.1
Host: 127.0.0.1:8000
X-API-Key: your_api_key

Custom user class

If you want to use a custom user class then its very easy! There are two ways

RedmineUser contains all the annotations for use with Doctrine, so its super simple to store users in the database.

Api Doc

If you want the api doc to be listed then use NelmioApiDocBundle

Kernel

new Nelmio\ApiDocBundle\NelmioApiDocBundle()

Routing

NelmioApiDocBundle:
    resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
    prefix:   /api/doc

Security

Replace the standard unsec

unsec:
    pattern: ^/(login$|api/doc)
    security: false

All versions of redmine_login with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-json Version *
guzzlehttp/guzzle Version ^6.2
mcfedr/json-form Version ^4.4
symfony/framework-bundle Version ^3.0|^4.0
symfony/form Version ^3.0|^4.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 ekreative/redmine_login contains the following files

Loading the files please wait ....