feat: add authentik for authentication #58
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
backend
ci
docs
frontend
lgtm
blocked
lgtm
done
lgtm
need 1
size
huge
size
large
size
medium
size
small
No project
No assignees
3 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: SZUT/casino#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/authentik"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
206eee4085
to8939c7be79
834ed7bbfc
to242b72ca45
thank me later
WIP: feat: add authentik for authenticationto feat: add authentik for authentication@ -20,3 +20,3 @@
private Long id;
@Column(unique = true)
private String keycloakId;
private String authentikId; // Changed from keycloakId to authentikId
Cool info, but not needed
@ -67,0 +70,4 @@
return response.getBody();
} catch (Exception e) {
System.err.println("Error fetching user info from Authentik: " + e.getMessage());
Consider throwing an exception idk
why tho what is that gonna do?
nvm at that point I could also just remove the catch here
@ -10,6 +10,8 @@ import lombok.Setter;
@AllArgsConstructor
@NoArgsConstructor
public class KeycloakUserDto {
// Renamed class but kept for backward compatibility
ok? Can be removed or renamed if needed
@ -11,2 +11,4 @@
@NoArgsConstructor
public class KeycloakUserDto {
// Renamed class but kept for backward compatibility
// This now contains Authentik user info
cool
@ -22,3 +20,1 @@
sessionStorage.setItem('user', JSON.stringify(user));
this.router.navigate(['home']);
try {
Remove comments
@ -0,0 +45,4 @@
this.oauthService.configure(this.authConfig);
this.setupEventHandling();
// Check if we're on the callback page
useless
@ -55,2 +46,2 @@
return user;
}
public getOrCreateUser(profile: Record<string, unknown>): Observable<User> {
// Authentik format might differ from Keycloak
cool bro
@ -30,3 +11,1 @@
redirectUri: window.location.origin + '/',
},
});
/* Example of a custom storage factory - not used in the current implementation
/* Example of a custom storage factory - not used in the current implementation
???
@ -1,6 +1,7 @@
import { ChangeDetectionStrategy, Component, inject, signal, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Router } from '@angular/router';
// Importing components used in templates
Remove comment