Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Authentication [class]

Description

A class for managing authentication of a user in your application.

Access: protected

Members

Instance members

Name Return type Description
clearAuthorization() Clears the authentication token that the Backend Services JavaScript SDK currently uses. Note that this is different than logging out, because the authorization token that was used, will not be invalidated.
clearPersistedAuthentication() Clears the current persisted authentication from the local store for the current Backend Services JavaScript SDK instance. Will not logout or modify the current authentication of the Javascript SDK.
getAuthenticationStatus([success], [error]) Gets the current authentication status of the Telerik Backend Services JavaScript SDK instance.
getAuthenticationStatus() Promise Gets the current authentication status of the Telerik Backend Services JavaScript SDK instance.
login(username, password) Promise Logs in a user using a username and a password to the current Backend Services JavaScript SDK instance. All requests initiated by the current Backend Services JavaScript SDK instance will be authenticated with that user's credentials.
login(username, password, [success], [error]) Logs in a user using a username and a password to the current Backend Services JavaScript SDK instance. All requests initiated by the current Backend Services JavaScript SDK instance will be authenticated with that user's credentials.
loginWithADFS(accessToken) Promise Log in a user using an ADFS access token.
loginWithADFS(accessToken, [success], [error]) Log in a user using an ADFS access token.
loginWithFacebook(accessToken, [success], [error]) Log in a user using an Facebook access token.
loginWithFacebook(accessToken) Promise Log in a user using an Facebook access token.
loginWithGoogle(accessToken) Promise Log in a user using a Google access token.
loginWithGoogle(accessToken, [success], [error]) Log in a user using a Google access token.
loginWithLiveID(accessToken) Promise Log in a user using a LiveID access token.
loginWithLiveID(accessToken, [success], [error]) Log in a user using a LiveID access token.
loginWithTwitter(token, tokenSecret, [success], [error]) Log in a user with a Twitter token. A secret token needs to be provided.
loginWithTwitter(token, tokenSecret) Promise Log in a user with a Twitter token. A secret token needs to be provided.
logout([success], [error]) Log out the user who is currently logged in.
logout() Promise Log out the user who is currently logged in.
setAuthorization(token, tokenType, principalId) Sets the token and token type that the Telerik Backend Services JavaScript SDK will use for authorization.
Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.