Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amido-profile-service

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amido-profile-service - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

bin/version

70

index.js

@@ -10,2 +10,10 @@ var EventEmitter = require('events').EventEmitter,

/**
* Instantiate an instance of the profile service SDK
* @param config
* @property {string} subscriptionKey
* @return {AmidoProfileService}
* @constructor
*/
function AmidoProfileService(config) {

@@ -24,15 +32,4 @@ if (!(this instanceof AmidoProfileService)) {

if (typeof config.zumoApplication !== 'string') {
throw new Error('The `zumoApplication` attribute must be supplied');
}
if (typeof config.realm !== 'string') {
throw new Error('The `realm` attribute must be supplied');
}
this.zumoApplication = config.zumoApplication;
this.subscriptionKey = config.subscriptionKey;
this.urls = new Urls(config.subscriptionKey);
this.realm = config.realm;

@@ -54,3 +51,11 @@ this.api = new Api(config.subscriptionKey);

AmidoProfileService.prototype.createProfile = function (user_id, realm, delegateToken, profile) {
/**
* Create a profile for an existing user within the specified realm
* @param userId - the user's ID
* @param realm - the realm to create the profile
* @param delegateToken - the user's access token to authorize with the API
* @param profile - the JSON profile to save
* @return {Promise} - resolved with the profile if successful.
*/
AmidoProfileService.prototype.createProfile = function (userId, realm, delegateToken, profile) {
var deferred = Q.defer();

@@ -69,3 +74,11 @@

AmidoProfileService.prototype.updateProfile = function (user_id, realm, delegateToken, profile) {
/**
* Update the profile of an existing user within the specified realm
* @param userId - the user's ID
* @param realm - the realm to create the profile
* @param delegateToken - the user's access token to authorize with the API
* @param profile - the JSON profile to save
* @return {Promise} - resolved with the profile if successful.
*/
AmidoProfileService.prototype.updateProfile = function (userId, realm, delegateToken, profile) {
var deferred = Q.defer();

@@ -89,3 +102,3 @@

* @param {string} screenName - name of fieldset to load
* @returns {Promise} -
* @returns {Promise} - Resolved with the fieldset
* @public

@@ -108,2 +121,9 @@ */

/**
* Get a user's profile for a specific schema
* @param userId - the user's ID
* @param realm - the realm to create the profile
* @param delegateToken - the user's access token to authorize with the API
* @return {Promise} - resolved with the user's profile
*/
AmidoProfileService.prototype.getProfile = function (userId, realm, delegateToken) {

@@ -124,2 +144,9 @@ var deferred = Q.defer();

/**
* Return a user's nested profile. If a user's profile has a parent profile, will also be returned.
* @param userId - the user's ID
* @param realm - the realm to create the profile
* @param delegateToken - the user's access token to authorize with the API
* @return {Promise} - resolved with the user's nested profile
*/
AmidoProfileService.prototype.getNestedProfile = function (userId, realm, delegateToken) {

@@ -140,2 +167,8 @@ var deferred = Q.defer();

/**
* Update a user's profile for their identity provider, defined by the identityProvider set in the constructor (if provided)
* @param userId - the user's ID
* @param profile - the profile to update
* @return {Promise} - resolved with the profile if successful
*/
AmidoProfileService.prototype.updateIdentityUser = function(userId, profile) {

@@ -145,8 +178,9 @@ return this.identityProvider.updateUser(userId, profile);

/**
* Create a new user profile with their identity provider, defined by the identityProvider set in the constructor (if provided)
* @param profile - the profile to save
* @return {Promise} - resolved with the profile if successful
*/
AmidoProfileService.prototype.createIdentityUser = function(profile) {
return this.identityProvider.createUser(profile);
};
AmidoProfileService.prototype.getSignupUrl = function () {
return this.urls.getSignupUrl();
};
{
"name": "amido-profile-service",
"version": "1.0.0",
"version": "1.0.2",
"description": "Amido Profile Service JavaScript SDK",

@@ -25,3 +25,4 @@ "main": "./index.js",

"jquery": "~2.1.1",
"through": "~2.3.4"
"through": "~2.3.4",
"q": "~1.0.1"
},

@@ -62,5 +63,5 @@ "devDependencies": {

"browserify-shim": {
"jquery": "global:jQuery",
"auth0-lock": "global:Auth0Lock"
"jquery": "global:jQuery",
"auth0-lock": "global:Auth0Lock"
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc