Class AuthResourceImpl
- java.lang.Object
-
- com.artisol.teneo.inquire.client.resources.AbstractResource
-
- com.artisol.teneo.inquire.client.resources.AuthResourceImpl
-
- All Implemented Interfaces:
com.artisol.teneo.inquire.api.resources.AuthResource
public class AuthResourceImpl extends AbstractResource implements com.artisol.teneo.inquire.api.resources.AuthResource
-
-
Field Summary
-
Fields inherited from interface com.artisol.teneo.inquire.api.resources.AuthResource
GET_LOGIN_DELEGATED_DESCRIPTION, GET_LOGIN_DELEGATED_NOTIFICATION_DESCRIPTION, GET_LOGIN_DELEGATED_NOTIFICATION_PATH, GET_LOGIN_DELEGATED_NOTIFICATION_SUMMARY, GET_LOGIN_DELEGATED_PATH, GET_LOGIN_DELEGATED_SUMMARY, GET_USER_INFO_DESCRIPTION, GET_USER_INFO_PATH, GET_USER_INFO_SUMMARY, PATH, POST_LOGIN_PATH, POST_LOGIN_SUMMARY, POST_LOGOUT_PATH, POST_LOGOUT_SUMMARY
-
-
Constructor Summary
Constructors Constructor Description AuthResourceImpl(javax.ws.rs.client.WebTarget webTarget, AuthorizationFilter authorizationFilter, boolean hasTeneoManagerClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.artisol.teneo.manager.api.models.common.User
getUserInfo()
Gets the user information from Teneo Manager.String
login(String username, String password)
Uses the username and password to do the user log-in against Teneo Manager.void
logout()
Does the log-out of the user from Teneo Manager and removes the generated access token from the client.
-
-
-
Constructor Detail
-
AuthResourceImpl
public AuthResourceImpl(javax.ws.rs.client.WebTarget webTarget, AuthorizationFilter authorizationFilter, boolean hasTeneoManagerClient)
-
-
Method Detail
-
login
public String login(String username, String password) throws com.artisol.teneo.inquire.api.exceptions.InquireException
Uses the username and password to do the user log-in against Teneo Manager. Returned token is stored internally.- Parameters:
username
- The user's namepassword
- The user's password- Returns:
- the user token
- Throws:
com.artisol.teneo.inquire.api.exceptions.InquireException
- if an unexpected error occurs during the method execution
-
logout
public void logout() throws com.artisol.teneo.inquire.api.exceptions.InquireException
Does the log-out of the user from Teneo Manager and removes the generated access token from the client.- Throws:
com.artisol.teneo.inquire.api.exceptions.InquireException
-
getUserInfo
public com.artisol.teneo.manager.api.models.common.User getUserInfo() throws com.artisol.teneo.inquire.api.exceptions.InquireException
Gets the user information from Teneo Manager.- Returns:
- a User object with the Teneo Manager information of the user
- Throws:
com.artisol.teneo.inquire.api.exceptions.InquireException
- if an unexpected error occurs during the method execution
-
-