Fusio AngularJS consumer implementation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
css
dist
docs
fonts
img
.gitignore
.htaccess
.jscsrc
.jshintrc
Gruntfile.js
LICENSE
README.md
bower.json
index.html
package.json

README.md

Fusio-Consumer

About

This is a sample Fusio consumer application which provides a basic account page to grant apps access to your account and to manage basic account data and app grants/credentials. More information about Fusio at https://fusio-project.org

Configuration

The app must know the API endpoint of Fusio. If not provided it tries to guess the correct endpoint url. If this does not work you can set the correct url at the /index.html file i.e.:

var fusioUrl = 'http://api.acme/';

At the /auth endpoint the user can authorize new apps. The OAuth2 specification states that the Redirection Endpoint URL must not contain a fragment component. Because of that we need to configure the Html5Mode so that we can use clean urls i.e.: /auth?response_type=code&client_id=afd389ff-3a3f-45d9-8ccc-c6574380f3da&scope=authorization,consumer

To correctly configure the html 5 mode you have to set a correct base tag in the /index.html file. Also you have to configure the webserver so that all requests are redirected to the index.html. I.e. for Apache you could use the following htaccess directives:

DirectoryIndex index.html
FallbackResource /consumer/index.html

Docs

The docs/ folder contains example content which should help your users to get started with the API. You need to adjust the content accodring to your use case. It is also easy possible to extend the documentation menu with new entries, therefor you only need to extend the setDocumentationMenu Method call at the index.html with new entries.

fusioProvider.setDocumentationMenu({
    'Overview': {
        'Getting started': 'bootstrap',
        'API': 'api',
        'Authorization': 'authorization',
        'Support': 'support'
    }
});

The app will then try to load the fitting html files from the docs/ folder.