AuthApi
CLASS in nl.bimbase.bimworks.client.apis.
API catalogue · nl.bimbase.bimworks.client.apis · CLASS
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)#
public AuthApi(nl.bimbase.bimworks.client.BimWorksClient bimWorksClient)Parameters#
| Name | Type | Description |
|---|---|---|
bimWorksClient |
BimWorksClient |
loginWithUsernamePassword(String, String)#
public com.fasterxml.jackson.databind.node.ObjectNode loginWithUsernamePassword(java.lang.String username, java.lang.String password) throws nl.bimbase.bimworks.client.BimWorksExceptionLogin 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)#
public void loginWithApiToken(java.lang.String apiToken) throws nl.bimbase.bimworks.client.BimWorksExceptionLogin 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()#
public void loginAnonymous() throws nl.bimbase.bimworks.client.BimWorksExceptionLogin anonymously
Exceptions#
BimWorksException—
register(String)#
public void register(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksExceptionRegister 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)#
public void validateEmailAddress(java.lang.String username, java.lang.String token, java.lang.String password) throws nl.bimbase.bimworks.client.BimWorksExceptionComplete 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)#
public void requestValidationEmail(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksExceptionAsk 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)#
public void requestEmailValidationToken(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksExceptionThe legacy name of #requestValidationEmail; same behaviour.
Parameters#
| Name | Type | Description |
|---|---|---|
username |
java.lang.String |
getAccountInfo()#
public com.fasterxml.jackson.databind.node.ObjectNode getAccountInfo() throws nl.bimbase.bimworks.client.BimWorksExceptionThe account behind this client: account, user, settings, features, organization.
getSettings()#
public com.fasterxml.jackson.databind.node.ObjectNode getSettings() throws nl.bimbase.bimworks.client.BimWorksExceptionThe user's settings object as stored.
saveSettings(ObjectNode)#
public void saveSettings(com.fasterxml.jackson.databind.node.ObjectNode settings) throws nl.bimbase.bimworks.client.BimWorksExceptionSave 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)#
public void changePassword(java.lang.String currentPassword, java.lang.String newPassword) throws nl.bimbase.bimworks.client.BimWorksExceptionChange 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)#
public void requestPasswordReset(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksExceptionAsk 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()#
public void signOutOtherSessions() throws nl.bimbase.bimworks.client.BimWorksExceptionSign out every other session of the account behind this client; this client continues on the new token the server answers with.
logout()#
public void logout() throws nl.bimbase.bimworks.client.BimWorksExceptionTell the server this session ends (the client itself is closed separately).
listTokens(String)#
public com.fasterxml.jackson.databind.node.ArrayNode listTokens(java.lang.String username) throws nl.bimbase.bimworks.client.BimWorksExceptionPersonal access tokens of the given user.
Parameters#
| Name | Type | Description |
|---|---|---|
username |
java.lang.String |
deleteToken(String, long)#
public void deleteToken(java.lang.String username, long id) throws nl.bimbase.bimworks.client.BimWorksExceptionParameters#
| Name | Type | Description |
|---|---|---|
username |
java.lang.String |
|
id |
long |
listCountries()#
public com.fasterxml.jackson.databind.JsonNode listCountries() throws nl.bimbase.bimworks.client.BimWorksExceptionlistLanguages()#
public com.fasterxml.jackson.databind.JsonNode listLanguages() throws nl.bimbase.bimworks.client.BimWorksExceptionlistTimeZones()#
public com.fasterxml.jackson.databind.JsonNode listTimeZones() throws nl.bimbase.bimworks.client.BimWorksExceptionlistBimContexts()#
public com.fasterxml.jackson.databind.JsonNode listBimContexts() throws nl.bimbase.bimworks.client.BimWorksExceptionInherited 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()