DoItYourself

DoItYourself

  • Docs
  • Try it out
  • Videos

›Guides

Getting started

  • Getting started with DIY

Guides

  • DIY for developers
  • DIY for administrators

Examples

  • Video examples

DIY for administrators

The Administration menu includes all the functions needed to configure DIY users and third-party client access.

User administration

User permissions

When you create new users and user roles, you need to assign permissions granting access to the different parts of the DIY application. The table below gives an overview of the kinds of permissions that apply to a particular user profile, but the actual permissions you grant depend on how the user will use the application.

User profilePermissions
AdministratorManage access token, Manage users, Manage third party applications, Manage roles, Account information, Manage access control rules
DeveloperNode red, Manage models, Manage datasources
End userAPI explorer

Create a new user role

Creating user roles allows you to define a user type with an associated set of permissions. You can then assign the roles when creating new users or access control rules.

  1. Select Roles and click alt-text.

alt-text

  1. Enter a name and description for the role and click Save.

alt-text

  1. Next to the new user role in the list, click alt-text.

alt-text

  1. Select the permissions required for the user and click Save when you have finished (see User permissions for an overview of permissions by user profile).

alt-text

Create a new user

  1. Select User and click alt-text.

alt-text

  1. Enter the email address and click Save.

alt-text

An account verification email is sent to the user and a new user entry appears in the list with a Pending verification icon next to it.

alt-text

  1. After the user has verified the account, the user entry changes to Verified.

alt-text

  1. Next to the user in the list, click one of the following to update the user's permissions (see User permissions for an overview of permissions by user profile):

alt-text

  • alt-text to view a list of permissions and enable/disable them individually alt-text
  • alt-text to assign a user role with all the associated permissions to the user account alt-text
  1. Click Save when you have finished.

Create access control rules

Once you have created your data model, you can restrict access to it, by limiting users/user roles to a specific type of access to the entire data model or specific endpoints.

  1. Select Access control rules and click alt-text.

alt-text

  1. Specify the details of the access control rule:
  • the Model and Method
  • the Access type the rule is granting
  • a User or Role Principal type, and the name of the user or role in Principal id

alt-text

  1. Toggle the Permission button to activate the rule and click Save when you have finished.

Third-party client application administration

You can configure third-party client applications to access your DIY APIs. The procedures below explain how to configure the access first in DIY, then on the client side, using Postman as an example.

Authentication

DIY uses OAuth 2.0 tokens for third-party client access. You can find more information on OAuth 2.0 authentication on the OAuth 2.0 website.

Configure the client access in DIY

  1. Select Client applications and click alt-text.

alt-text

  1. Enter the details of the client application:
  • name
  • secret code
  • OAuth 2.0 grant type
  • Public or Private application type
  • specify Scopes as DEFAULT
  • callback URLs

alt-text

  1. Click Save when you have finished. The client application is saved with a new client application ID.

alt-text

Request the token on the client side

  1. Create a new OAuth2 access token request on the client side. In the Postman application, for example, you need to request the token in your endpoint's Authorization tab.

alt-text

  1. Specify the details of the token request, ensuring the values match the DIY client configuration. In this example, the Access Token URL includes an example domain and the OAuth /token endpoint, the OAuth 2.0 requirement for Password grant types. Your own URL needs to include your own DIY domain and the appropriate OAuth 2.0 grant type endpoint (see the OAuth 2.0 website for more details).

alt-text

  1. After you click Request Token, Postman displays details of the token returned by DIY.

alt-text

Access token management

You can review and revoke access tokens by selecting the Access tokens option.

alt-text

← DIY for developersVideo examples →
  • User administration
    • User permissions
    • Create a new user role
    • Create a new user
    • Create access control rules
  • Third-party client application administration
    • Authentication
    • Configure the client access in DIY
    • Request the token on the client side
    • Access token management
DoItYourself
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Copyright © 2019 DoItYourself