Updated the UI docs for the authresouce
This commit is contained in:
committed by
Nathan Woulfe
parent
9bcfbf282b
commit
102ae0c402
@@ -12,7 +12,24 @@
|
||||
function authResource($q, $http, umbRequestHelper, angularHelper) {
|
||||
|
||||
return {
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.resources.authResource#get2FAProviders
|
||||
* @methodOf umbraco.resources.authResource
|
||||
*
|
||||
* @description
|
||||
* Logs the Umbraco backoffice user in if the credentials are good
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* authResource.get2FAProviders()
|
||||
* .then(function(data) {
|
||||
* //Do stuff ...
|
||||
* });
|
||||
* </pre>
|
||||
* @returns {Promise} resourcePromise object
|
||||
*
|
||||
*/
|
||||
get2FAProviders: function () {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
@@ -23,6 +40,25 @@ function authResource($q, $http, umbRequestHelper, angularHelper) {
|
||||
'Could not retrive two factor provider info');
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.resources.authResource#get2FAProviders
|
||||
* @methodOf umbraco.resources.authResource
|
||||
*
|
||||
* @description
|
||||
* Generate the two-factor authentication code for the provider and send it to the user
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* authResource.send2FACode(provider)
|
||||
* .then(function(data) {
|
||||
* //Do stuff ...
|
||||
* });
|
||||
* </pre>
|
||||
* @param {string} provider Name of the provider
|
||||
* @returns {Promise} resourcePromise object
|
||||
*
|
||||
*/
|
||||
send2FACode: function (provider) {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
@@ -34,6 +70,26 @@ function authResource($q, $http, umbRequestHelper, angularHelper) {
|
||||
'Could not send code');
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.resources.authResource#get2FAProviders
|
||||
* @methodOf umbraco.resources.authResource
|
||||
*
|
||||
* @description
|
||||
* Verify the two-factor authentication code entered by the user against the provider
|
||||
*
|
||||
* ##usage
|
||||
* <pre>
|
||||
* authResource.verify2FACode(provider, code)
|
||||
* .then(function(data) {
|
||||
* //Do stuff ...
|
||||
* });
|
||||
* </pre>
|
||||
* @param {string} provider Name of the provider
|
||||
* @param {string} code The two-factor authentication code
|
||||
* @returns {Promise} resourcePromise object
|
||||
*
|
||||
*/
|
||||
verify2FACode: function (provider, code) {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
|
||||
Reference in New Issue
Block a user