meraki/frontend/authentication

Create a Meraki Frontend API wrapper for the authentication process. This is uses the same API as the Meraki webfrontend. So stuff can break

Source:
Example
const target = 'n12'
const basePath = ``
const rateLimiter = {
 enabled: true
}
const authenticationEndpoints = require('./lib/frontend/authentication')({ basePath, baseUrl, rateLimiter })
Parameters:
Name Type Attributes Default Description
target string <optional>
'account'

The Meraki target

basePath string <optional>

The Meraki base path for the Authentication ressource

baseUrl string <optional>

The Meraki base url for the Authentication ressource

rateLimiter string

The rate limiter (bottleneck) configuration

Returns:

The initialized Meraki REST API wrapper for the Authentication ressource

Type
Object

Methods

(async, static) login(targetopt, emailopt, passwordopt) → {Promise}

Source:

Authenticates the user against the "api"

Example

Example response

{
success: true,
org_eid: '123',
user:
{ id: '123',
     name: '123 123',
     email: '123.123@123.123',
     is_admin: false,
     is_write_admin: false,
     is_org_admin: true,
     is_org_write_admin: true,
     is_org_enterprise_admin: false,
     is_sales_demo_admin: false,
     admin_permissions_hash:
  { '682858293500110100': [Object],
       '682858293500110095': [Object],
       '682858293500110098': [Object],
       '682858293500110096': [Object],
       '682858293500110099': [Object],
       '682858293500110097': [Object] },
   administered_networks: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
   path: 'https://n123.meraki.com/' },
   orgs: [ { id: '123',
     eid: '123',
     uid: '123',
     org_admin_type: 'write',
     name: 'Api Delete',
     node_groups: {},
     num_networks: 2,
     locales: {},
     shard_id: 213,
     licensed_product_edition_name: 'enterprise',
     license_expires_on: 0,
     block_meraki_admins: false,
     org: [Object],
     inventory: [],
     api_level: 0,
     support_password: '123' }],
   mobile_auth_token:'MY_SUPER_SECRET_TOKEN' }
Parameters:
Name Type Attributes Default Description
target string <optional>
targetOrt

Optional custom target for this request (if not set will take the inital target)

email string <optional>
emailOrg

email address of the user to authenticate with

password string <optional>
passwordOrg

password of the user to authenticate with

Returns:

A promise holding the organizations this user has privileges on

Type
Promise