{
  "name": "UserCredential",
  "base": "PersistedModel",
  "properties": {
    "provider": {
      "type": "String",
      "comments": "facebook, google, twitter, linkedin"
    },
    "authScheme": {
      "type": "String",
      "comments": "oAuth, oAuth 2.0, OpenID, OpenID Connect"
    },
    "externalId": {
      "type": "String",
      "comments": "The provider specific id"
    },
    "profile": {
      "type": "Object"
    },
    "credentials": {
      "type": "Object"
    },
    "created": "Date",
    "modified": "Date"
  },
  "acls": [{
    "principalType": "ROLE",
    "principalId": "$everyone",
    "permission": "DENY"
  }, {
    "principalType": "ROLE",
    "principalId": "$owner",
    "permission": "ALLOW"
  }],
  "relations": {
    "user": {
      "type": "belongsTo",
      "model": "User",
      "foreignKey": "userId"
    }
  }
}
