Reference·Java · nl.bimbase.bimworks.client.apisJava

AuthApi

CLASS in nl.bimbase.bimworks.client.apis.

API catalogue · nl.bimbase.bimworks.client.apis · CLASS

Java#
public class AuthApi

Authentication related API calls.

Inheritance and interfaces#

Members#

Member Kind Description
AuthApi(BimWorksClient) CONSTRUCTOR
loginWithUsernamePassword(String, String) METHOD Login with a username/password. Only use this for testing purposes, in most cases using an API Token is safer.
loginWithApiToken(String) METHOD Login with an API Token. Generally you should not call this method manually, it is called already when creating a new BimWorksClient using BimWorksClientFact…
loginAnonymous() METHOD Login anonymously
register(String) METHOD Register a new user
validateEmailAddress(String, String, String) METHOD Complete a registration: the token from the validation email, and the password the new account gets (the server asks for the password at validation time).
requestValidationEmail(String) METHOD Ask the server to (re)send the validation email of a registered but not yet validated account. Answers the same whether or not the address has an account; a …
requestEmailValidationToken(String) METHOD The legacy name of #requestValidationEmail; same behaviour.
getAccountInfo() METHOD The account behind this client: account, user, settings, features, organization.
getSettings() METHOD The user's settings object as stored.
saveSettings(ObjectNode) METHOD Save user settings; only the known keys are copied by the server (fullName, countryCode, preferredLanguage, timeZoneId, bimContext, `showDeletedNod…
changePassword(String, String) METHOD Change the password of the account behind this client. The server signs out every other session of the account and answers with a new token for this one, whi…
requestPasswordReset(String) METHOD Ask for a password-reset link for the address. Answers the same whether or not the address has an account.
signOutOtherSessions() METHOD Sign out every other session of the account behind this client; this client continues on the new token the server answers with.
logout() METHOD Tell the server this session ends (the client itself is closed separately).
listTokens(String) METHOD Personal access tokens of the given user.
deleteToken(String, long) METHOD
listCountries() METHOD
listLanguages() METHOD
listTimeZones() METHOD
listBimContexts() METHOD

AuthApi(BimWorksClient)#

Parameters#

Name Type Description
bimWorksClient BimWorksClient

loginWithUsernamePassword(String, String)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode loginWithUsernamePassword(java.lang.String username, java.lang.String password) throws nl.bimbase.bimworks.client.BimWorksException

Login with a username/password. Only use this for testing purposes, in most cases using an API Token is safer.

Parameters#

Name Type Description
username java.lang.String
password java.lang.String

Exceptions#

  • BimWorksException —

loginWithApiToken(String)#

Java#
public void loginWithApiToken(java.lang.String apiToken) throws nl.bimbase.bimworks.client.BimWorksException

Login with an API Token. Generally you should not call this method manually, it is called already when creating a new BimWorksClient using BimWorksClientFactory#createClientWithApiToken(String)

Parameters#

Name Type Description
apiToken java.lang.String The API Token

Exceptions#

  • BimWorksException —

loginAnonymous()#

Java#
public void loginAnonymous() throws nl.bimbase.bimworks.client.BimWorksException

Login anonymously

Exceptions#

  • BimWorksException —

register(String)#

Java#
public void register(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksException

Register a new user

Parameters#

Name Type Description
username java.lang.String The requested username, should always be in the form of a valid email address

Exceptions#

  • BimWorksException —

validateEmailAddress(String, String, String)#

Java#
public void validateEmailAddress(java.lang.String username, java.lang.String token, java.lang.String password) throws nl.bimbase.bimworks.client.BimWorksException

Complete a registration: the token from the validation email, and the password the new account gets (the server asks for the password at validation time).

Parameters#

Name Type Description
username java.lang.String
token java.lang.String
password java.lang.String

requestValidationEmail(String)#

Java#
public void requestValidationEmail(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksException

Ask the server to (re)send the validation email of a registered but not yet validated account. Answers the same whether or not the address has an account; a confirmed account gets nothing.

Parameters#

Name Type Description
username java.lang.String

requestEmailValidationToken(String)#

Java#
public void requestEmailValidationToken(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksException

The legacy name of #requestValidationEmail; same behaviour.

Parameters#

Name Type Description
username java.lang.String

getAccountInfo()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getAccountInfo() throws nl.bimbase.bimworks.client.BimWorksException

The account behind this client: account, user, settings, features, organization.

getSettings()#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode getSettings() throws nl.bimbase.bimworks.client.BimWorksException

The user's settings object as stored.

saveSettings(ObjectNode)#

Java#
public void saveSettings(com.fasterxml.jackson.databind.node.ObjectNode settings) throws nl.bimbase.bimworks.client.BimWorksException

Save user settings; only the known keys are copied by the server (fullName, countryCode, preferredLanguage, timeZoneId, bimContext, showDeletedNodes, emailAboutVulnarabilities).

Parameters#

Name Type Description
settings com.fasterxml.jackson.databind.node.ObjectNode

changePassword(String, String)#

Java#
public void changePassword(java.lang.String currentPassword, java.lang.String newPassword) throws nl.bimbase.bimworks.client.BimWorksException

Change the password of the account behind this client. The server signs out every other session of the account and answers with a new token for this one, which the client adopts.

Parameters#

Name Type Description
currentPassword java.lang.String
newPassword java.lang.String

requestPasswordReset(String)#

Java#
public void requestPasswordReset(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksException

Ask for a password-reset link for the address. Answers the same whether or not the address has an account.

Parameters#

Name Type Description
username java.lang.String

signOutOtherSessions()#

Java#
public void signOutOtherSessions() throws nl.bimbase.bimworks.client.BimWorksException

Sign out every other session of the account behind this client; this client continues on the new token the server answers with.

logout()#

Java#
public void logout() throws nl.bimbase.bimworks.client.BimWorksException

Tell the server this session ends (the client itself is closed separately).

listTokens(String)#

Java#
public com.fasterxml.jackson.databind.node.ArrayNode listTokens(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksException

Personal access tokens of the given user.

Parameters#

Name Type Description
username java.lang.String

deleteToken(String, long)#

Java#
public void deleteToken(java.lang.String username, long id) throws nl.bimbase.bimworks.client.BimWorksException

Parameters#

Name Type Description
username java.lang.String
id long

listCountries()#

Java#
public com.fasterxml.jackson.databind.JsonNode listCountries() throws nl.bimbase.bimworks.client.BimWorksException

listLanguages()#

Java#
public com.fasterxml.jackson.databind.JsonNode listLanguages() throws nl.bimbase.bimworks.client.BimWorksException

listTimeZones()#

Java#
public com.fasterxml.jackson.databind.JsonNode listTimeZones() throws nl.bimbase.bimworks.client.BimWorksException

listBimContexts()#

Java#
public com.fasterxml.jackson.databind.JsonNode listBimContexts() throws nl.bimbase.bimworks.client.BimWorksException

Inherited members#

  • java.lang.Object#equals(java.lang.Object)
  • java.lang.Object#toString()
  • java.lang.Object#wait(long)
  • java.lang.Object#wait(long,int)
  • java.lang.Object#wait()
  • java.lang.Object#finalize()
  • java.lang.Object#getClass()
  • java.lang.Object#hashCode()
  • java.lang.Object#clone()
  • java.lang.Object#notify()
  • java.lang.Object#notifyAll()
  • getBimWorksClient()