Internal
Internal
httpAllow applications to access displayed user information. When third-party applications
request to access user information they need the consent of the end user. This method will
allow the 3rd party application to receive the information. Allow
button in Consent
view uses this method.
auth.acceptConsent()
Helper method for checking password strength for rules defined in PlusAuth. This method would be useful in SignUp and ResetPassword views.
const password = '123'
const passwordRules = window.PlusAuth.passwordPolicy
const passwordStrength = auth.checkPasswordStrength(password, passwordRules)
if( passwordStrength === true ){
console.log('password is strong enough')
} else {
console.log('Password is not strong enough', passwordStrength)
}
Password to check
Object containing password rules
Forbid applications to access displayed user information. When third-party applications
request to access user information they need the consent of the end user. This method will
reject the 3rd party application's request to receive the information. Reject
button in
Consent
view uses this method.
auth.rejectConsent()
After clicking the reset password email, users will be delivered on a page which will
request their new password. Use this method to post their new password and token from the
url. If Auto SignIn
is enabled in Settings > Login
user will be redirected to Tenant Login URL
automatically. Reset Password
view in PlusAuth uses this method to submit the form.
const pathParts = location.pathname.split('/')
const token = pathParts[pathParts.length - 1];
auth.resetPassword('NEW_PASSWORD', token).then(function(){
console.log('Password reset successfully')
})
New password of user
Received token in the url
Submits user credentials to the endpoint /signin
.
Here is a simple usage.
auth.signIn( { username: "johndoe@example.com", password: "mypassword" } )
With different strategy.
auth.signIn( { username: "johndoe@example.com", password: "mypassword" }, "myLdapStrategy" )
Key/Value object for validating user.
Optional
strategy: stringPlusAuth strategy to check user. Make sure you have created this strategy in your tenant.
Posts a request for registering a user.
Here is a simple usage.
auth.signUp( { username: "johndoe@example.com", password: "mypassword" } )
With phone number.
auth.signUp( { username: "johndoe@example.com", password: "mypassword", phone_number: '+11231212123' } )
With different strategy.
auth.signUp( { username: "johndoe@example.com", password: "mypassword" }, "myLdapStrategy" )
Key/Value object containing user information.
Optional
strategy: stringPlusAuth strategy to create the user for. Make sure you have created this strategy in your tenant.
In some cases user may need to enter additional information for their profile. For example
applications may force users to enter their phone number. Fill Missing
view in PlusAuth
uses this method to post the form.
auth.updateMissingInformation({ phone_number: '+1222334455'})
Key/Value object containing user information
Generated using TypeDoc
Class containing authorization related methods.