Skip to main content

Authentication Service V1 (Deprecated)

danger

The V1 authentication and OAuth APIs are deprecated and are being phased out. The following documentation is only for existing partners who are already using it. If you are a new partner please refer to Authentication V2

A token is a piece of data that has no meaning or use on its own, but combined with the correct tokenization system, becomes a vital player in securing your application. Token based authentication works by ensuring that each request to a server is accompanied by a signed toke (RFC 7519) that defines a compact and self-contained method for securely transmitting information between parties encoded as a JSON object.

The Authentication API enables you to manage all aspects of user identity when you use Auth0. It offers endpoints so your users can log in, sign up, log out, access APIs, and more.

note

Your access-token contains many privileges, keep it secure!

APIs


Login

Login to receive token with username and password.

Parameters

Returns

Code

  @Autowired
private TenantsApiClient tenantsApiClient;

public AuthenticationResultType login(WebSignInRequest webSignInRequest){
return this.tenantsApiClient.login(webSignInRequest);
}

Connect With Authorization Code

API to complete OAuth connection with code and get tokens

Parameters

  • authCode String

Returns

Code

  @Autowired
private OAuth2PartnerClient oauth2PartnerClient;

public OAuth2AccessToken connect(String authCode) {
return this.oauth2PartnerClient.connectWithDeskera(authCode);
}

Validate Deskera Access Token

API to check the validity of Deskera Access Token

Parameters

  • accessToken String

Returns

  • isValid Boolean

Code

  @Autowired
private OAuth2PartnerClient oauth2PartnerClient;

public Boolean validateDeskeraToken(String accessToken) {
return this.oauth2PartnerClient.validateToken(accessToken);
}

Refresh Deskera Access Token

API to fetch new access token with refresh token

Parameters

  • refreshToken String

Returns

Code

  @Autowired
private OAuth2PartnerClient oauth2PartnerClient;

public AuthenticationResultTypeDto refreshDeskeraToken(String refreshToken) {
return this.oauth2PartnerClient.getAppRefreshToken(refreshToken);
}

Objects


AuthenticationResultTypeDto

AttributeTypeDescription
accessTokenstring
expiresIninteger
idTokenstring
newDeviceMetadataNewDeviceMetadataType
refreshTokenstring
tokenTypestring

NewDeviceMetadataType

AttributeTypeDescription
deviceGroupKeystring
deviceKeystring

WebSignInRequest

AttributeTypeDescription
passwordstringUser password
userNamestringUsername

OAuth2AccessToken

AttributeTypeDescription
accessTokenstringAuth token (Unused)
tokenTypestringToken Type
refreshTokenstringAuth refresh token (Unused)
expiresInfloatTime of expiry (Unused)
scopestringToken Scope
deskeraTokenstringDeskera Access Token
deskeraRefreshTokenstringDeskera Refresh Token