Skip to content
Merged

Dev #61

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
b1a77d6
Add Maven Checkstyle Plugin #6
rodrigoprestesmachado Jun 21, 2022
3a51a2a
Add Maven Checkstyle Plugin #6
rodrigoprestesmachado Jun 21, 2022
abc2b72
bugfix
rodrigoprestesmachado Jun 21, 2022
1af5fe6
Merge pull request #7 from orion-services/feature/add-maven-checkstyl…
rodrigoprestesmachado Jun 21, 2022
90fdec9
Architecture #8
rodrigoprestesmachado Jul 2, 2022
f61a0e3
#8 documentation
rodrigoprestesmachado Jul 2, 2022
823ccc9
#8 doc bugfix
rodrigoprestesmachado Jul 2, 2022
c8c036a
#8
rodrigoprestesmachado Jul 2, 2022
850b55e
#8
rodrigoprestesmachado Jul 2, 2022
30f5b9e
#8
rodrigoprestesmachado Jul 9, 2022
e4b7e00
#8
rodrigoprestesmachado Jul 11, 2022
dc75523
#8 sonar fix
rodrigoprestesmachado Jul 11, 2022
1f14f88
Merge pull request #9 from orion-services/feature/architecture
rodrigoprestesmachado Jul 11, 2022
31cefe8
#10
rodrigoprestesmachado Jul 14, 2022
66a6fc9
Merge pull request #11 from orion-services/feature/new-login
rodrigoprestesmachado Jul 14, 2022
9c32a53
#20 Change and Recover Password Endpoints
ricardowaldow Nov 3, 2022
0397000
Change Email & Delete User endpoints + Unique name
ricardowaldow Nov 9, 2022
2fa861a
#20 fix - Change email and password
ricardowaldow Nov 11, 2022
af68308
Enabling CORS
MateusDelatorre Nov 17, 2022
4049fa1
test: CreateAuthenticate test fixed
ricardowaldow Nov 21, 2022
7bca2c5
Merge pull request #22 from orion-services/20-change-and-retrieve-pas…
rodrigoprestesmachado Nov 21, 2022
1518d39
test: Test Coverage Augmentation
ricardowaldow Nov 22, 2022
045b6b8
Merge pull request #24 from orion-services/23-increase-test-coverage
rodrigoprestesmachado Nov 23, 2022
e2c09f1
#25 starting to organize the files
rodrigoprestesmachado Nov 23, 2022
8c8b8fd
Users enhancement #25
rodrigoprestesmachado Nov 23, 2022
26d0620
Users enhancement #25
rodrigoprestesmachado Nov 23, 2022
24b57a3
Users enhancement #25
rodrigoprestesmachado Nov 23, 2022
1944a03
Users enhancement #25
rodrigoprestesmachado Nov 24, 2022
11d181a
Users enhancement #25
rodrigoprestesmachado Nov 24, 2022
cfd0c20
fix: #27 Fixing Architecture Issue
ricardowaldow Nov 24, 2022
3951856
fix: Generate Password and Config
ricardowaldow Nov 25, 2022
0fc92ec
Users enhancement #25
rodrigoprestesmachado Nov 27, 2022
344971d
Users enhancement #25
rodrigoprestesmachado Nov 28, 2022
fc5378c
docs: #26 Documentation updated
ricardowaldow Nov 28, 2022
b72e69e
fix: Missing Annotations
ricardowaldow Nov 28, 2022
f896eae
Users enhancement #25
rodrigoprestesmachado Nov 29, 2022
d5ce923
Merge pull request #29 from orion-services/users-enhancement
rodrigoprestesmachado Nov 29, 2022
ff7c4d4
devcontainer
rodrigoprestesmachado Nov 30, 2022
2bc4039
Roles
rodrigoprestesmachado Dec 7, 2022
13dca17
E-mail validation
rodrigoprestesmachado Dec 8, 2022
684f058
E-mail validation
rodrigoprestesmachado Dec 8, 2022
536bbd4
documentation update
rodrigoprestesmachado Dec 9, 2022
07a66c6
documentation update
rodrigoprestesmachado Dec 9, 2022
b47630f
documentation
rodrigoprestesmachado Dec 9, 2022
ad866fd
#31: implements 2FA qrCode generator
Mar 20, 2023
871cbd2
#31: implements 2FA code validation
Mar 21, 2023
4ba8e1f
#31 refactoring 2FA validation methods and creating necessary methods
Mar 27, 2023
ad7293b
#31: removing some unused code
Mar 27, 2023
af0b84a
Social login #30
rodrigoprestesmachado Mar 30, 2023
f1317d3
Social login #30 bug fix
rodrigoprestesmachado Mar 30, 2023
90f1095
Merge branch 'social-login' of https://github.com/orion-services/user…
Mar 31, 2023
32a728f
#31: refactoring code to SonnaLint pattern
Mar 31, 2023
f1063cb
#31: implements integration tests
Apr 1, 2023
df5f2d1
Merge pull request #33 from orion-services/2fa-auth
rodrigoprestesmachado Apr 1, 2023
2a5c719
Social login #30 merge fix
rodrigoprestesmachado Apr 2, 2023
6c92706
Merge pull request #32 from orion-services/social-login
rodrigoprestesmachado Apr 2, 2023
be285a4
fix: #37 Dockerfile.native update
ricardowaldow Apr 3, 2023
c788793
fix: #37 Adding execution of import.sql on NC
ricardowaldow Apr 3, 2023
5b76283
fix: Adding fields required do NC + Security
ricardowaldow Apr 4, 2023
239e1bc
Merge pull request #38 from orion-services/37-compilação-nativa
rodrigoprestesmachado Apr 4, 2023
848cb29
test: Create Google User test added
ricardowaldow Apr 4, 2023
065d253
Adding surefire on pom.xml
ricardowaldow Apr 5, 2023
98673c8
#35 wip: 2fa-unit-tests
Apr 6, 2023
d539c66
35: finish unit tests
Apr 11, 2023
55a8a97
#35: update changelog
Apr 19, 2023
ab04d7a
#35: update changelog
Apr 19, 2023
fa12bc7
#34 add 2fa doc
Apr 21, 2023
5feafbe
#34 add 2FAuth diagram sequence
Apr 22, 2023
349003a
#36 add 2FAuth comments
Apr 22, 2023
db209ba
Merge pull request #41 from orion-services/2fa-documentation
rodrigoprestesmachado May 5, 2023
4aef900
Merge pull request #39 from orion-services/test-coverage
rodrigoprestesmachado May 5, 2023
9422c64
Quarkus 3
rodrigoprestesmachado May 5, 2023
9df8cc4
Quarkus 3 #44
rodrigoprestesmachado May 5, 2023
089f022
Merge pull request #45 from orion-services/rodrigoprestesmachado/issue44
rodrigoprestesmachado May 5, 2023
d8d8639
Quarkus 3 #44
rodrigoprestesmachado May 5, 2023
e8cfa56
#44
rodrigoprestesmachado May 5, 2023
302a942
Merge pull request #46 from orion-services/rodrigoprestesmachado/issue44
rodrigoprestesmachado May 5, 2023
6d75468
#47: wip: changing 2fa validate
May 9, 2023
99c0f17
#47: Two factor auth enhanced
May 10, 2023
adb914f
#47: Two factor auth enhanced
May 10, 2023
6b7322d
#47: Adjust unit tests
May 10, 2023
5db7410
#49: apply clean architecture layers
May 12, 2023
ba7f7bf
#49: apply clean architecture layers
May 12, 2023
ae905d3
#49: removing class inheritance
May 16, 2023
71a2b2d
#49: separating use cases
May 16, 2023
98b86a3
#49: wip: organizing unit tests
May 22, 2023
2334651
#49: organize tests
May 23, 2023
b294447
#49: organize tests
May 23, 2023
6c29bb7
#49: removing some unused classes
May 24, 2023
447d969
#49: wip: tests enhancement
May 25, 2023
ff1a445
Merge pull request #51 from orion-services/2fa-enhancement
rodrigoprestesmachado May 25, 2023
fd2f612
Merge pull request #52 from orion-services/clean-architecture-enhance…
rodrigoprestesmachado May 25, 2023
bc864d9
Clean architecture refactor #53
rodrigoprestesmachado Jun 1, 2023
33b90b7
Clean architecture refactor
rodrigoprestesmachado Jun 6, 2023
491af09
devcontainer update
rodrigoprestesmachado Jun 7, 2023
b2e4079
devcontainer
rodrigoprestesmachado Jun 7, 2023
106f229
devcontainer
rodrigoprestesmachado Jun 7, 2023
3d2c114
devcontainer
rodrigoprestesmachado Jun 7, 2023
4747af8
devcontainer
rodrigoprestesmachado Jun 7, 2023
8855f5b
devcontainer
rodrigoprestesmachado Jun 7, 2023
baa5eec
Clean architecture refactor
rodrigoprestesmachado Jul 13, 2023
f2fa374
quarkus update
rodrigoprestesmachado Nov 4, 2023
e6072c8
new dev
rodrigoprestesmachado May 9, 2024
d279216
Review all users features
rodrigoprestesmachado May 9, 2024
2003413
#57 checkstyle and update to quarkus 3.10
rodrigoprestesmachado May 10, 2024
72bc777
Review all users features #57
rodrigoprestesmachado May 10, 2024
c46db79
Review all users features #57
rodrigoprestesmachado May 10, 2024
d322dde
Review all users features #57
rodrigoprestesmachado May 12, 2024
7a45593
Review all users features #57
rodrigoprestesmachado May 12, 2024
fe239d7
Review all users features
rodrigoprestesmachado May 13, 2024
ecfce98
Review all users features
rodrigoprestesmachado May 14, 2024
a61ee21
Review all users features
rodrigoprestesmachado May 22, 2024
6b61d37
first port
rodrigoprestesmachado Nov 20, 2025
cc8662e
update license
rodrigoprestesmachado Nov 20, 2025
0d889d7
2FA WebAuthn
rodrigoprestesmachado Nov 20, 2025
c968e51
frontend
rodrigoprestesmachado Nov 20, 2025
c4ee51a
update
rodrigoprestesmachado Nov 20, 2025
d148243
update
rodrigoprestesmachado Nov 20, 2025
ef9c6e9
update social login
rodrigoprestesmachado Nov 20, 2025
a1f8bbd
update playground
rodrigoprestesmachado Nov 21, 2025
bc799e8
Google Login
rodrigoprestesmachado Nov 21, 2025
4363f7a
Removed Login with Apple
rodrigoprestesmachado Nov 22, 2025
1ea2497
2FA bugfix
rodrigoprestesmachado Nov 22, 2025
de3a057
Merge pull request #60 from orion-services/kotlin
rodrigoprestesmachado Nov 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:21",

"features": {
"ghcr.io/devcontainers/features/java:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers-contrib/features/quarkus-sdkman:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers-contrib/features/maven-sdkman:2": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"Equinusocio.vsc-material-theme-icons",
"ybaumes.highlight-trailing-white-spaces",
"amodio.amethyst-theme",
"vscjava.vscode-java-pack",
"redhat.vscode-quarkus",
"redhat.vscode-microprofile-pack",
"eamodio.gitlens",
"rangav.vscode-thunder-client",
"vscjava.vscode-lombok",
"GitHub.copilot",
"GitHub.copilot-chat",
"GitHub.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"cweijan.vscode-mysql-client2",
"cracrayol.java-pmd",
"SonarSource.sonarlint-vscode",
"streetsidesoftware.code-spell-checker-portuguese-brazilian"
],
"settings": {
"workbench.colorTheme": "Default Light Modern",
"workbench.iconTheme": "eq-material-theme-icons-light",
"editor.rulers": [80,120],
"workbench.colorCustomizations": {
"editorRuler.foreground": "#F3F7FF"
},
"cSpell.enabled": true,
"cSpell.language": "pt_BR, en, pt"
}
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
15 changes: 4 additions & 11 deletions .github/workflows/ci.yml → .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Orion User CI
name: Orion User

on:
push:
Expand All @@ -14,18 +14,12 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
Expand All @@ -35,5 +29,4 @@ jobs:
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=orion-services_users
run: mvn -B verify
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nb-configuration.xml
# Visual Studio Code
.vscode
.factorypath
.history

# OSX
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .mvn/wrapper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
maven-wrapper.jar
138 changes: 47 additions & 91 deletions .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,110 +17,60 @@
* under the License.
*/

import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
import java.io.IOException;
import java.io.InputStream;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;

public class MavenWrapperDownloader
public final class MavenWrapperDownloader
{
private static final String WRAPPER_VERSION = "3.1.0";
private static final String WRAPPER_VERSION = "3.2.0";

/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL =
"https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/" + WRAPPER_VERSION
+ "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) );

/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use instead of the
* default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH = ".mvn/wrapper/maven-wrapper.properties";

/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar";

/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";

public static void main( String args[] )
public static void main( String[] args )
{
System.out.println( "- Downloader started" );
File baseDirectory = new File( args[0] );
System.out.println( "- Using base directory: " + baseDirectory.getAbsolutePath() );
log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION );

// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File( baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH );
String url = DEFAULT_DOWNLOAD_URL;
if ( mavenWrapperPropertyFile.exists() )
if ( args.length != 2 )
{
FileInputStream mavenWrapperPropertyFileInputStream = null;
try
{
mavenWrapperPropertyFileInputStream = new FileInputStream( mavenWrapperPropertyFile );
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load( mavenWrapperPropertyFileInputStream );
url = mavenWrapperProperties.getProperty( PROPERTY_NAME_WRAPPER_URL, url );
}
catch ( IOException e )
{
System.out.println( "- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'" );
}
finally
{
try
{
if ( mavenWrapperPropertyFileInputStream != null )
{
mavenWrapperPropertyFileInputStream.close();
}
}
catch ( IOException e )
{
// Ignore ...
}
}
System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" );
System.exit( 1 );
}
System.out.println( "- Downloading from: " + url );

File outputFile = new File( baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH );
if ( !outputFile.getParentFile().exists() )
{
if ( !outputFile.getParentFile().mkdirs() )
{
System.out.println( "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath()
+ "'" );
}
}
System.out.println( "- Downloading to: " + outputFile.getAbsolutePath() );
try
{
downloadFileFromURL( url, outputFile );
System.out.println( "Done" );
System.exit( 0 );
log( " - Downloader started" );
final URL wrapperUrl = new URL( args[0] );
final String jarPath = args[1].replace( "..", "" ); // Sanitize path
final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize();
downloadFileFromURL( wrapperUrl, wrapperJarPath );
log( "Done" );
}
catch ( Throwable e )
catch ( IOException e )
{
System.out.println( "- Error downloading" );
e.printStackTrace();
System.err.println( "- Error downloading: " + e.getMessage() );
if ( VERBOSE )
{
e.printStackTrace();
}
System.exit( 1 );
}
}

private static void downloadFileFromURL( String urlString, File destination )
throws Exception
private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath )
throws IOException
{
log( " - Downloading to: " + wrapperJarPath );
if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null )
{
String username = System.getenv( "MVNW_USERNAME" );
char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray();
final String username = System.getenv( "MVNW_USERNAME" );
final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray();
Authenticator.setDefault( new Authenticator()
{
@Override
Expand All @@ -130,13 +80,19 @@ protected PasswordAuthentication getPasswordAuthentication()
}
} );
}
URL website = new URL( urlString );
ReadableByteChannel rbc;
rbc = Channels.newChannel( website.openStream() );
FileOutputStream fos = new FileOutputStream( destination );
fos.getChannel().transferFrom( rbc, 0, Long.MAX_VALUE );
fos.close();
rbc.close();
try ( InputStream inStream = wrapperUrl.openStream() )
{
Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING );
}
log( " - Downloader complete" );
}

private static void log( String msg )
{
if ( VERBOSE )
{
System.out.println( msg );
}
}

}
Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Users change Log

## 0.0.5

- Port to Kotlin

## 0.0.4

- Clean Architecture
- Updated to Quarkus 3
- Updated to Java 20 Temurin

## 0.0.3

- Creates Two Factor QrCode
- Validates Two Factor Code Login

## 0.0.2

- Creates a user
- Sends an e-mail validation
- Validates an e-mail
- Generates a sign JWT token (authentication)
- Creates a user and Generates a sign JWT token (createsAuthenticates)
- Recovers password
- Updates e-mail
- Updates password

## 0.0.1

- Initial version
Loading
Loading