Index

A C D E F G H I J L M N O P R S T U V 
All Classes|All Packages

A

agency() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController.RegisterCredentials
 
agency() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
agency() - Method in class com.fredriksonsound.iot_backoffice_auth.model.User
 
Agency - Class in com.fredriksonsound.iot_backoffice_auth.model
Database translation specification for agency table
Agency() - Constructor for class com.fredriksonsound.iot_backoffice_auth.model.Agency
 
AgencyRepository - Interface in com.fredriksonsound.iot_backoffice_auth.data
Database interaction interface.
API_VERSION - Static variable in class com.fredriksonsound.iot_backoffice_auth.IotBackofficeAuthApplication
 
AppConfig - Class in com.fredriksonsound.iot_backoffice_auth
Any spring config that needs to be done that cant be done in application.[ENVIRONMENT].properties
AppConfig() - Constructor for class com.fredriksonsound.iot_backoffice_auth.AppConfig
 
AuthController - Class in com.fredriksonsound.iot_backoffice_auth.endpoint
Authentication api
AuthController() - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController
 
AuthController.AuthCredentials - Class in com.fredriksonsound.iot_backoffice_auth.endpoint
 
AuthCredentials(String, String) - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController.AuthCredentials
 
AuthService - Class in com.fredriksonsound.iot_backoffice_auth.service
AuthService implementation
AuthService() - Constructor for class com.fredriksonsound.iot_backoffice_auth.service.AuthService
 

C

collect() - Method in class com.fredriksonsound.iot_backoffice_auth.web.CreatedResponse
 
collect() - Method in class com.fredriksonsound.iot_backoffice_auth.web.ErrorResponse
 
collect() - Method in class com.fredriksonsound.iot_backoffice_auth.web.OkResponse
 
collect() - Method in interface com.fredriksonsound.iot_backoffice_auth.web.Response
 
collect() - Method in class com.fredriksonsound.iot_backoffice_auth.web.UnauthorizedResponse
 
com.fredriksonsound.iot_backoffice_auth - package com.fredriksonsound.iot_backoffice_auth
This package contains the application main function and confuiiguration classes.
com.fredriksonsound.iot_backoffice_auth.data - package com.fredriksonsound.iot_backoffice_auth.data
This package contains the Repository interfaces for accessing and modifying data.
com.fredriksonsound.iot_backoffice_auth.endpoint - package com.fredriksonsound.iot_backoffice_auth.endpoint
This package contains the Controllers, the publicly exposed web API.
com.fredriksonsound.iot_backoffice_auth.model - package com.fredriksonsound.iot_backoffice_auth.model
This package contains the object representation of datastore talbe rows.
com.fredriksonsound.iot_backoffice_auth.service - package com.fredriksonsound.iot_backoffice_auth.service
This package contains the Services, the business logic.
com.fredriksonsound.iot_backoffice_auth.util - package com.fredriksonsound.iot_backoffice_auth.util
This package contains static utility functions.
com.fredriksonsound.iot_backoffice_auth.web - package com.fredriksonsound.iot_backoffice_auth.web
This package contains web response helper classes.
CONFLICTING_USER - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
corsConfigurer() - Method in class com.fredriksonsound.iot_backoffice_auth.IotBackofficeAuthApplication
 
CreatedResponse<T> - Class in com.fredriksonsound.iot_backoffice_auth.web
More ergonomic response
CreatedResponse(T) - Constructor for class com.fredriksonsound.iot_backoffice_auth.web.CreatedResponse
 

D

decodeJwToken(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.TokensUtils
Decodes a JWT token
Default - Class in com.fredriksonsound.iot_backoffice_auth.endpoint
Contains / mapping for checking if API is alive and what version.
Default() - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.Default
 
deleteRefreshToken(String) - Method in class com.fredriksonsound.iot_backoffice_auth.service.AuthService
Deletes a specified access token by id
deleteRefreshToken(String) - Method in interface com.fredriksonsound.iot_backoffice_auth.service.IAuthService
 

E

email() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController.AuthCredentials
 
email() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController.RegisterCredentials
 
email() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
email() - Method in class com.fredriksonsound.iot_backoffice_auth.model.User
 
Environment - Class in com.fredriksonsound.iot_backoffice_auth
General app environment settings.
Environment() - Constructor for class com.fredriksonsound.iot_backoffice_auth.Environment
 
ENVIRONMENT - Variable in class com.fredriksonsound.iot_backoffice_auth.Environment
 
ERROR_CODE - Enum in com.fredriksonsound.iot_backoffice_auth.service
Error codes for the view layer to use in generating user messages
errorCode - Variable in exception com.fredriksonsound.iot_backoffice_auth.model.ValidationError
 
ErrorResponse<T> - Class in com.fredriksonsound.iot_backoffice_auth.web
More ergonomic response
ErrorResponse(T) - Constructor for class com.fredriksonsound.iot_backoffice_auth.web.ErrorResponse
 
ErrorResponse(T, HttpStatus) - Constructor for class com.fredriksonsound.iot_backoffice_auth.web.ErrorResponse
 
existsByUsername(String) - Method in interface com.fredriksonsound.iot_backoffice_auth.data.UserRepository
 
EXPIRED_ACCESS_TOKEN - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
EXPIRED_REFRESH_TOKEN - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 

F

findByUsername(String) - Method in interface com.fredriksonsound.iot_backoffice_auth.data.UserRepository
 
first - Variable in class com.fredriksonsound.iot_backoffice_auth.util.Pair
 

G

generateAndSaveTokens(String) - Method in class com.fredriksonsound.iot_backoffice_auth.service.AuthService
Generates a new access token and refresh token.
generateAndSaveTokens(String) - Method in interface com.fredriksonsound.iot_backoffice_auth.service.IAuthService
 
getAccessToken(String, String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.TokensUtils
Generates a short lived access token
getCustomToken(String, String, long) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.TokensUtils
Generates a custom token
getRefreshToken(String, String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.TokensUtils
Generates a long lived refresh token for a specified user, with a specified token id
getUSer(String, String) - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController
Gets user info of a user by email, if the user is allowed

API doc:
Description: Gets user info of a user by email, if the user is allowed
Method: GET
Location: /users/[USER_EMAIL]
Headers:
Auth-Token: [token]

Success response: {status: "success", user: {..USER_DATA}}, CODE: 200
Error response: {status: "error", message: [error_message]}, 400 or 401

H

Hash(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.PasswordUtils
Create salted hash from password

I

IAuthService - Interface in com.fredriksonsound.iot_backoffice_auth.service
AuthService interface
id() - Method in class com.fredriksonsound.iot_backoffice_auth.model.RefreshToken
 
index() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.Default
Default endpoint

API doc:
Description: Returns the current API version as text
method: GET
Success response: "auth server v[API_VERSION]"
Error response: N/A
INVALID_EMAIL - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
INVALID_JWT - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
INVALID_PASSWORD - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
INVALID_USERNAME - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
IotBackofficeAuthApplication - Class in com.fredriksonsound.iot_backoffice_auth
Contains main, initializes Spring
IotBackofficeAuthApplication() - Constructor for class com.fredriksonsound.iot_backoffice_auth.IotBackofficeAuthApplication
 
IUserService - Interface in com.fredriksonsound.iot_backoffice_auth.service
UserService interface.

J

JsonFromMessage(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.web.CreatedResponse
 
JsonFromMessage(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.web.ErrorResponse
 
JsonFromMessage(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.web.OkResponse
 
JsonFromMessage(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.web.UnauthorizedResponse
 
JWT_PRIV_KEY_STR - Static variable in class com.fredriksonsound.iot_backoffice_auth.Environment
 
JWT_PUB_KEY_STR - Static variable in class com.fredriksonsound.iot_backoffice_auth.Environment
 

L

loginWithCredentials(AuthController.AuthCredentials) - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController
Logs a user using email and password combination.
logoutToken(String) - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController
logs a specified user out, deletes the corresponding refresh token responds 200 whether the token exists or not

API doc:
Description: logs a specified user out, deletes the corresponding refresh token responds 200 whether the token exists or not
Method: POST
Location: /auth/logout
Headers:
Refresh-Token: the refresh token to use

Success response: {status: "ok", message: "no such token"|"token deleted"}, CODE: 200
Error response: {status: "error", message: [error_message]}, 400 or 401

M

main(String[]) - Static method in class com.fredriksonsound.iot_backoffice_auth.IotBackofficeAuthApplication
Application entrypoint Starts a spring application

N

name() - Method in class com.fredriksonsound.iot_backoffice_auth.model.Agency
 
NONE - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
NONEXISTENT_AGENCY - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
NONEXISTENT_REFRESH_TOKEN - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
NONEXPIRED_ACCESS_TOKEN - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 

O

OkResponse<T> - Class in com.fredriksonsound.iot_backoffice_auth.web
More ergonomic response
OkResponse(T) - Constructor for class com.fredriksonsound.iot_backoffice_auth.web.OkResponse
 
oldPassword() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
orgnr() - Method in class com.fredriksonsound.iot_backoffice_auth.model.Agency
 

P

Pair<K,​V> - Class in com.fredriksonsound.iot_backoffice_auth.util
Simple Pair implementation
Pair(K, V) - Constructor for class com.fredriksonsound.iot_backoffice_auth.util.Pair
 
pass_hash() - Method in class com.fredriksonsound.iot_backoffice_auth.model.User
 
password() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController.AuthCredentials
 
password() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController.RegisterCredentials
 
password() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
PasswordUtils - Class in com.fredriksonsound.iot_backoffice_auth.util
Utility class for passwords

R

refresh(String, String) - Method in class com.fredriksonsound.iot_backoffice_auth.service.AuthService
Generates a new access token given an expired accesstoken and a refresh token id
refresh(String, String) - Method in interface com.fredriksonsound.iot_backoffice_auth.service.IAuthService
 
refresh_token() - Method in class com.fredriksonsound.iot_backoffice_auth.model.RefreshToken
 
REFRESH_TOKEN_LIFETIME_MILLIS - Static variable in class com.fredriksonsound.iot_backoffice_auth.util.TokensUtils
 
refreshAccessToken(String, String) - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController
Refreshes an access token using specified refresh token

API doc:
Description: Refreshes an access token using specified refresh token
Method: POST
Location: /users
Headers:
Refresh-Token: the refresh token to use
Auth-Token: the expired auth token

Success response: {status: "success", token: [token]}, CODE: 200
Error response: {status: "error", message: [error_message]}, 400 or 401
RefreshToken - Class in com.fredriksonsound.iot_backoffice_auth.model
Database translation specification for refresh_token table
RefreshToken() - Constructor for class com.fredriksonsound.iot_backoffice_auth.model.RefreshToken
 
RefreshToken(String, String) - Constructor for class com.fredriksonsound.iot_backoffice_auth.model.RefreshToken
 
RegisterController - Class in com.fredriksonsound.iot_backoffice_auth.endpoint
Register endpoint
RegisterController() - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController
 
RegisterController.RegisterCredentials - Class in com.fredriksonsound.iot_backoffice_auth.endpoint
 
RegisterCredentials() - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController.RegisterCredentials
 
RegisterCredentials(String, String, String, String) - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController.RegisterCredentials
 
registerUser(RegisterController.RegisterCredentials) - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController


API doc:
Description: Creates a new user given user details
Method: POST
Location: /users
Body:
{
username: [username],
email: [email],
password: [password],
agency: [an_existing_agency]
}
Success response: {status: "ok"}, CODE: 201
Error response: {status: "error", message: [error_message]}
Response<T> - Interface in com.fredriksonsound.iot_backoffice_auth.web
More ergonomic response interface

S

saveNewUser(RegisterController.RegisterCredentials) - Method in interface com.fredriksonsound.iot_backoffice_auth.service.IUserService
 
saveNewUser(RegisterController.RegisterCredentials) - Method in class com.fredriksonsound.iot_backoffice_auth.service.UserService
Saves a new user to the database
second - Variable in class com.fredriksonsound.iot_backoffice_auth.util.Pair
 
SQL_DB - Variable in class com.fredriksonsound.iot_backoffice_auth.Environment
 
SQL_HOST - Variable in class com.fredriksonsound.iot_backoffice_auth.Environment
 
SQL_PASS - Variable in class com.fredriksonsound.iot_backoffice_auth.Environment
 
SQL_USER - Variable in class com.fredriksonsound.iot_backoffice_auth.Environment
 

T

TOKEN_LIFETIME_MILLIS - Static variable in class com.fredriksonsound.iot_backoffice_auth.util.TokensUtils
 
TokenRepository - Interface in com.fredriksonsound.iot_backoffice_auth.data
Database interaction interface.
TokensUtils - Class in com.fredriksonsound.iot_backoffice_auth.util
Utility class for tokens
toString() - Method in class com.fredriksonsound.iot_backoffice_auth.model.User
 

U

UNAUTHORIZED_RESOURCE_ACCESS - com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
 
UnauthorizedResponse<T> - Class in com.fredriksonsound.iot_backoffice_auth.web
More ergonomic response
UnauthorizedResponse(T) - Constructor for class com.fredriksonsound.iot_backoffice_auth.web.UnauthorizedResponse
 
UnauthorizedResponse(T, HttpStatus) - Constructor for class com.fredriksonsound.iot_backoffice_auth.web.UnauthorizedResponse
 
updateUser(UsersController.UpdateUser, String) - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController
Updates a user, if the username and email is avaliable, and oldPassword matches the users old password

API doc:
Description: Updates a user, if the username and email is avaliable, and oldPassword matches the users old password
Method: PUT
Location: /users/[USER_EMAIL]
Body:
{
username: [new_username],
email: [new_email],
password: [new_password],
oldPassword: [old_password],
agency: [new__agency]
}
Success response: {status: "success", message: "user_updated"}, CODE: 200
Error response: {status: "error", message: [error_message]}, 400 or 401
UpdateUser() - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
UpdateUser(String, String, String, String, String) - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
User - Class in com.fredriksonsound.iot_backoffice_auth.model
Database translation specification for users table
User() - Constructor for class com.fredriksonsound.iot_backoffice_auth.model.User
 
User(String, String, String, String) - Constructor for class com.fredriksonsound.iot_backoffice_auth.model.User
 
username() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController.RegisterCredentials
 
username() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
username() - Method in class com.fredriksonsound.iot_backoffice_auth.model.User
 
UserRepository - Interface in com.fredriksonsound.iot_backoffice_auth.data
Database interaction interface.
UsersController - Class in com.fredriksonsound.iot_backoffice_auth.endpoint
Users API
UsersController() - Constructor for class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController
 
UsersController.UpdateUser - Class in com.fredriksonsound.iot_backoffice_auth.endpoint
 
UserService - Class in com.fredriksonsound.iot_backoffice_auth.service
UserService implementation
UserService() - Constructor for class com.fredriksonsound.iot_backoffice_auth.service.UserService
 
UserUtils - Class in com.fredriksonsound.iot_backoffice_auth.util
Utility class for users

V

VALID_EMAIL_ADDRESS_REGEX - Static variable in class com.fredriksonsound.iot_backoffice_auth.util.UserUtils
 
VALID_PASSWORD_REGEX - Static variable in class com.fredriksonsound.iot_backoffice_auth.util.UserUtils
 
VALID_USERNAME_REGEX - Static variable in class com.fredriksonsound.iot_backoffice_auth.util.UserUtils
 
validate() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.AuthController.AuthCredentials
 
validate() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.RegisterController.RegisterCredentials
 
validate() - Method in class com.fredriksonsound.iot_backoffice_auth.endpoint.UsersController.UpdateUser
 
validate() - Method in interface com.fredriksonsound.iot_backoffice_auth.model.ValidationError.Validatable
 
validateAccessFor(String, String) - Method in class com.fredriksonsound.iot_backoffice_auth.service.AuthService
Validates whether a tokens access-level (authToken.subject) is valid for accessing the resource (subject)
validateAccessFor(String, String) - Method in interface com.fredriksonsound.iot_backoffice_auth.service.IAuthService
 
validateUserPassword(String, String) - Method in class com.fredriksonsound.iot_backoffice_auth.service.AuthService
Checks that a given password matches a given user email
validateUserPassword(String, String) - Method in interface com.fredriksonsound.iot_backoffice_auth.service.IAuthService
 
ValidationError - Exception in com.fredriksonsound.iot_backoffice_auth.model
ValidationError instances represent an error in user submitted data See ERROR_CODE enum.
ValidationError(ERROR_CODE) - Constructor for exception com.fredriksonsound.iot_backoffice_auth.model.ValidationError
 
ValidationError.Validatable - Interface in com.fredriksonsound.iot_backoffice_auth.model
 
validEmail(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.UserUtils
 
validPassword(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.UserUtils
Verifies that an password is valid RULES: minlen = 6 maxlen = 32 must have ONE upper case char must have 1 number
validUsername(String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.UserUtils
Verifies that an email address is a valid email address
valueOf(String) - Static method in enum com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.fredriksonsound.iot_backoffice_auth.service.ERROR_CODE
Returns an array containing the constants of this enum type, in the order they are declared.
verify(String, String) - Static method in class com.fredriksonsound.iot_backoffice_auth.util.PasswordUtils
Verifies that a salted hashed password matches cleartext password
A C D E F G H I J L M N O P R S T U V 
All Classes|All Packages