Package co.arago.hiro.client.rest
Class AuthAPI
- java.lang.Object
-
- co.arago.hiro.client.connection.AbstractAPIHandler
-
- co.arago.hiro.client.rest.AuthenticatedAPIHandler
-
- co.arago.hiro.client.rest.AuthAPI
-
public class AuthAPI extends AuthenticatedAPIHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthAPI.Builderstatic classAuthAPI.Conf<T extends AuthAPI.Conf<T>>classAuthAPI.GetMeAccountCommandget account information about current tokenclassAuthAPI.GetMeAvatarCommandget avatar of current token's accountclassAuthAPI.GetMeProfileCommandget profile of current token's accountclassAuthAPI.GetMeRolesCommandget roles connected to of current token teamsclassAuthAPI.GetMeTeamsCommandgets the teams connected to current tokenclassAuthAPI.PostMeProfileCommandchange profile of current token's accountclassAuthAPI.PutMeAvatarCommandset avatar of current token's accountclassAuthAPI.PutMePasswordCommandchange password of current token's account-
Nested classes/interfaces inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler
AuthenticatedAPIHandler.APIRequestConf<T extends AuthenticatedAPIHandler.APIRequestConf<T,R>,R>, AuthenticatedAPIHandler.SendBodyAPIRequestConf<T extends AuthenticatedAPIHandler.SendBodyAPIRequestConf<T,R>,R>, AuthenticatedAPIHandler.SendStreamAPIRequestConf<T extends AuthenticatedAPIHandler.SendStreamAPIRequestConf<T,R>,R>
-
-
Field Summary
-
Fields inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler
apiName, apiPath, apiURI, tokenAPIHandler
-
Fields inherited from class co.arago.hiro.client.connection.AbstractAPIHandler
httpClientHandler, httpRequestTimeout, maxRetries, rootApiURI, title, userAgent, version, webSocketURI
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAuthAPI(AuthAPI.Conf<?> builder)Protected constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthAPI.GetMeAccountCommandgetMeAccountCommand()get account information about current tokenAuthAPI.GetMeAvatarCommandgetMeAvatarCommand()get avatar of current token's accountAuthAPI.GetMeProfileCommandgetMeProfileCommand()get profile of current token's accountAuthAPI.GetMeRolesCommandgetMeRolesCommand()get roles connected to of current token teamsAuthAPI.GetMeTeamsCommandgetMeTeamsCommand()gets the teams connected to current tokenstatic AuthAPI.Conf<?>newBuilder(TokenAPIHandler tokenAPIHandler)Get aAuthAPI.BuilderforAuthAPI.AuthAPI.PostMeProfileCommandpostMeProfileCommand()change profile of current token's accountAuthAPI.PutMeAvatarCommandputMeAvatarCommand(StreamContainer streamContainer)set avatar of current token's accountAuthAPI.PutMeAvatarCommandputMeAvatarCommand(java.io.InputStream inputStream)set avatar of current token's accountAuthAPI.PutMePasswordCommandputMePasswordCommand()change password of current token's account-
Methods inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler
addToHeaders, checkResponse, getEndpointURI
-
Methods inherited from class co.arago.hiro.client.connection.AbstractAPIHandler
addQueryFragmentAndNormalize, buildApiURI, buildEndpointURI, buildURI, buildWebSocketURI, delete, executeAsyncWithStreamBody, executeAsyncWithStringBody, executeBinary, executeWithStreamBody, executeWithStringBody, get, getBinary, getConf, getHttpLogger, getHttpRequestTimeout, getMaxRetries, getOrBuildClient, getRequestBuilder, getRootApiURI, getUserAgent, getWebSocketURI, patch, patchBinary, post, postBinary, put, putBinary, send, sendAsync
-
-
-
-
Constructor Detail
-
AuthAPI
protected AuthAPI(AuthAPI.Conf<?> builder)
Protected constructor. Create thisAuthAPIby using itsAuthAPI.Builder.- Parameters:
builder- The builder to use.
-
-
Method Detail
-
newBuilder
public static AuthAPI.Conf<?> newBuilder(TokenAPIHandler tokenAPIHandler)
Get aAuthAPI.BuilderforAuthAPI.- Parameters:
tokenAPIHandler- The API handler for this websocket.- Returns:
- The
AuthAPI.BuilderforAuthAPI.
-
getMeAccountCommand
public AuthAPI.GetMeAccountCommand getMeAccountCommand()
get account information about current tokenAPI GET /api/auth/[version]/me/account
- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
getMeAvatarCommand
public AuthAPI.GetMeAvatarCommand getMeAvatarCommand()
get avatar of current token's accountAPI GET /api/auth/[version]/me/avatar
- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
putMeAvatarCommand
public AuthAPI.PutMeAvatarCommand putMeAvatarCommand(StreamContainer streamContainer)
set avatar of current token's accountAPI PUT /api/auth/[version]/me/avatar
- Parameters:
streamContainer- The existingStreamContainer. Must not be null.- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
putMeAvatarCommand
public AuthAPI.PutMeAvatarCommand putMeAvatarCommand(java.io.InputStream inputStream)
set avatar of current token's accountAPI PUT /api/auth/[version]/me/avatar
- Parameters:
inputStream- The inputStream for the request body. Must not be null.- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
putMePasswordCommand
public AuthAPI.PutMePasswordCommand putMePasswordCommand()
change password of current token's accountAPI PUT /api/auth/[version]/me/password
- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
getMeProfileCommand
public AuthAPI.GetMeProfileCommand getMeProfileCommand()
get profile of current token's accountAPI GET /api/auth/[version]/me/profile
- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
postMeProfileCommand
public AuthAPI.PostMeProfileCommand postMeProfileCommand()
change profile of current token's accountAPI POST /api/auth/[version]/me/profile
- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
getMeRolesCommand
public AuthAPI.GetMeRolesCommand getMeRolesCommand()
get roles connected to of current token teamsAPI GET /api/auth/[version]/me/roles
- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
getMeTeamsCommand
public AuthAPI.GetMeTeamsCommand getMeTeamsCommand()
gets the teams connected to current tokenAPI GET /api/auth/[version]/me/teams
- Returns:
- New instance of the command. Use method "execute()" after all parameters have been set to run the command.
- See Also:
- API Documentation
-
-