OpenVeo Core server

API Docs for: 7.0.0
Show:

client

Module: core-oauth

static

Summary

Provides functions to interface oauth clients and openveo Web Service.

Item Index

Methods

Methods

checkGrantType

Syntax

checkGrantType

(
  • client
  • grantType
)
Boolean static

Summary

Checks grant type permission for the client.

For now only client_credentials grant type is available.

Parameters:

  • client Object

    An OAuth client

  • grantType String

    The grant type asked by client

Returns:

Boolean:

true if the grant type is "client_credentials" false otherwise

checkScope

Syntax

checkScope

(
  • oAuthClient
)
Array static

Summary

Gets the list of scopes granted for the client.

Parameters:

  • oAuthClient Object

    An OAuth client

    • scopes Object

      The client's scopes

Returns:

Array:

scope The list of scopes sent by the OAuth client

checkSecret

Syntax

checkSecret

(
  • oAuthClient
  • secret
  • callback
)
static

Summary

Verifies client's secret.

Parameters:

  • oAuthClient Object

    An OAuth client

    • secret String

      The client's secret

  • secret String

    OAuth client's secret to verify

  • callback Function

    with :

    • Error An error is something went wrong or null if everything is fine
    • Boolean true if the client's secret is verified

fetchById

Syntax

fetchById

(
  • id
  • callback
)
static

Summary

Fetches client object by primary key.

Parameters:

  • id String

    The client id

  • callback Function

    with :

    • Object An error is something went wrong or null if everything is fine
    • Object The client object or null if something went wrong

getClientProvider

Syntax

getClientProvider

() ClientProvider private

Summary

Gets client provider.

Returns:

ClientProvider:

The client provider

getId

Syntax

getId

(
  • oAuthClient
)
String static

Summary

Gets clients id.

Parameters:

  • oAuthClient Object

    An OAuth client

Returns:

String:

The client id