-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/arpa 53#3 #44
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e9a7674
added captcha to login component
MichaelKaiser1 dbc1ae6
Revert "added captcha to login component"
MichaelKaiser1 536ccfc
Revert "Revert "added captcha to login component""
MichaelKaiser1 acbafd0
minor change
MichaelKaiser1 b2caaf0
solved lint
MichaelKaiser1 106cea5
import captcha in prime-ng.module
MichaelKaiser1 edc8acc
implemented different option
MichaelKaiser1 48b9c57
minor changes
MichaelKaiser1 5d8c46f
Merge branch 'main' into feature/ARPA-53#3
MichaelKaiser1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,131 @@ | ||
import { LogoutComponent } from './components/onboarding/logout/logout.component'; | ||
import { LoadingComponent } from './components/loading/loading.component'; | ||
import { UserListComponent } from './components/dashboards/user-list/user-list.component'; | ||
import { environment } from './../environments/environment'; | ||
import { LOCAL_STORAGE_TOKEN_KEY } from './services/auth.service'; | ||
import { PrimeNgModule } from './modules/prime-ng/prime-ng.module'; | ||
import { NoRoleComponent } from './components/dashboards/no-role/no-role.component'; | ||
import { NotFoundComponent } from './components/not-found/not-found.component'; | ||
import { ForbiddenComponent } from './components/forbidden/forbidden.component'; | ||
import { FooterComponent } from './components/shell/footer/footer.component'; | ||
import { DashboardComponent } from './components/dashboards/dashboard/dashboard.component'; | ||
import { OnboardingShellComponent } from './components/onboarding/onboarding-shell/onboarding-shell.component'; | ||
import { MainComponent } from './components/shell/main/main.component'; | ||
import { LOCALE_ID, NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { CheckboxModule } from 'primeng/checkbox'; | ||
import { ReactiveFormsModule } from '@angular/forms'; | ||
import { HttpClientModule, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http'; | ||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; | ||
import { TranslateHttpLoader } from '@ngx-translate/http-loader'; | ||
import { AppComponent } from './app.component'; | ||
import { ArpalogoComponent } from './components/arpalogo/arpalogo.component'; | ||
import { LoginComponent } from './components/onboarding/login/login.component'; | ||
import { RegisterComponent } from './components/onboarding/register/register.component'; | ||
import { AppRoutingModule } from './app-routing.module'; | ||
import { PerformerComponent } from './components/dashboards/performer/performer.component'; | ||
import { EmailconfirmationComponent } from './components/onboarding/emailconfirmation/emailconfirmation.component'; | ||
import { StaffComponent } from './components/dashboards/staff/staff.component'; | ||
import { AdministratorComponent } from './components/dashboards/administrator/administrator.component'; | ||
import { TopbarComponent } from './components/shell/topbar/topbar.component'; | ||
import { JwtModule } from '@auth0/angular-jwt'; | ||
import { WithCredentialsInterceptor } from './interceptors/with-credentials.interceptor'; | ||
import { API_URL } from './models/api-url'; | ||
import { registerLocaleData } from '@angular/common'; | ||
import localeDe from '@angular/common/locales/de'; | ||
import { ToastrModule } from 'ngx-toastr'; | ||
import { ErrorInterceptor } from './interceptors/error.interceptor'; | ||
import { ForgotPasswordComponent } from './components/onboarding/forgot-password/forgot-password.component'; | ||
import { LanguageMenuComponent } from './components/language-menu/language-menu.component'; | ||
import { ProfileComponent } from './components/onboarding/profile/profile.component'; | ||
import {AcceptLanguageInterceptor} from './interceptors/accept-language.interceptor'; | ||
|
||
registerLocaleData(localeDe, 'de'); | ||
|
||
export function HttpLoaderFactory(httpClient: HttpClient): TranslateHttpLoader { | ||
return new TranslateHttpLoader(httpClient); | ||
} | ||
|
||
export function tokenGetter(): string | null { | ||
return localStorage.getItem(LOCAL_STORAGE_TOKEN_KEY); | ||
} | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent, | ||
ArpalogoComponent, | ||
LoginComponent, | ||
RegisterComponent, | ||
PerformerComponent, | ||
EmailconfirmationComponent, | ||
StaffComponent, | ||
AdministratorComponent, | ||
MainComponent, | ||
TopbarComponent, | ||
OnboardingShellComponent, | ||
DashboardComponent, | ||
FooterComponent, | ||
ForbiddenComponent, | ||
NotFoundComponent, | ||
NoRoleComponent, | ||
UserListComponent, | ||
LoadingComponent, | ||
LogoutComponent, | ||
ForgotPasswordComponent, | ||
LanguageMenuComponent, | ||
ProfileComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
BrowserAnimationsModule, | ||
ReactiveFormsModule, | ||
HttpClientModule, | ||
FormsModule, | ||
CheckboxModule, | ||
TranslateModule.forRoot({ | ||
loader: { | ||
provide: TranslateLoader, | ||
useFactory: HttpLoaderFactory, | ||
deps: [HttpClient], | ||
}, | ||
}), | ||
AppRoutingModule, | ||
PrimeNgModule, | ||
JwtModule.forRoot({ | ||
config: { | ||
tokenGetter, | ||
allowedDomains: [environment.api.baseUrl], | ||
disallowedRoutes: [], | ||
}, | ||
}), | ||
ToastrModule.forRoot({ | ||
progressBar: true, | ||
positionClass: 'toast-top-full-width' | ||
}), | ||
], | ||
providers: [ | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: WithCredentialsInterceptor, | ||
multi: true, | ||
}, | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: AcceptLanguageInterceptor, | ||
multi: true, | ||
}, | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: ErrorInterceptor, | ||
multi: true, | ||
}, | ||
{ provide: API_URL, useValue: `${environment.api.protocol}://${environment.api.baseUrl}` }, | ||
{ provide: LOCALE_ID, useValue: 'de-de' }, | ||
], | ||
bootstrap: [AppComponent], | ||
}) | ||
export class AppModule {} | ||
import { LogoutComponent } from './components/onboarding/logout/logout.component'; | ||
import { LoadingComponent } from './components/loading/loading.component'; | ||
import { UserListComponent } from './components/dashboards/user-list/user-list.component'; | ||
import { environment } from './../environments/environment'; | ||
import { LOCAL_STORAGE_TOKEN_KEY } from './services/auth.service'; | ||
import { PrimeNgModule } from './modules/prime-ng/prime-ng.module'; | ||
import { NoRoleComponent } from './components/dashboards/no-role/no-role.component'; | ||
import { NotFoundComponent } from './components/not-found/not-found.component'; | ||
import { ForbiddenComponent } from './components/forbidden/forbidden.component'; | ||
import { FooterComponent } from './components/shell/footer/footer.component'; | ||
import { DashboardComponent } from './components/dashboards/dashboard/dashboard.component'; | ||
import { OnboardingShellComponent } from './components/onboarding/onboarding-shell/onboarding-shell.component'; | ||
import { MainComponent } from './components/shell/main/main.component'; | ||
import { LOCALE_ID, NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { CheckboxModule } from 'primeng/checkbox'; | ||
import { ReactiveFormsModule } from '@angular/forms'; | ||
import { HttpClientModule, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http'; | ||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; | ||
import { TranslateHttpLoader } from '@ngx-translate/http-loader'; | ||
import { AppComponent } from './app.component'; | ||
import { ArpalogoComponent } from './components/arpalogo/arpalogo.component'; | ||
import { LoginComponent } from './components/onboarding/login/login.component'; | ||
import { RegisterComponent } from './components/onboarding/register/register.component'; | ||
import { AppRoutingModule } from './app-routing.module'; | ||
import { PerformerComponent } from './components/dashboards/performer/performer.component'; | ||
import { EmailconfirmationComponent } from './components/onboarding/emailconfirmation/emailconfirmation.component'; | ||
import { StaffComponent } from './components/dashboards/staff/staff.component'; | ||
import { AdministratorComponent } from './components/dashboards/administrator/administrator.component'; | ||
import { TopbarComponent } from './components/shell/topbar/topbar.component'; | ||
import { JwtModule } from '@auth0/angular-jwt'; | ||
import { WithCredentialsInterceptor } from './interceptors/with-credentials.interceptor'; | ||
import { API_URL } from './models/api-url'; | ||
import { registerLocaleData } from '@angular/common'; | ||
import localeDe from '@angular/common/locales/de'; | ||
import { ToastrModule } from 'ngx-toastr'; | ||
import { ErrorInterceptor } from './interceptors/error.interceptor'; | ||
import { ForgotPasswordComponent } from './components/onboarding/forgot-password/forgot-password.component'; | ||
import { LanguageMenuComponent } from './components/language-menu/language-menu.component'; | ||
import { ProfileComponent } from './components/onboarding/profile/profile.component'; | ||
import { NgxCaptchaModule } from 'ngx-captcha'; | ||
import {AcceptLanguageInterceptor} from './interceptors/accept-language.interceptor'; | ||
|
||
registerLocaleData(localeDe, 'de'); | ||
|
||
export function HttpLoaderFactory(httpClient: HttpClient): TranslateHttpLoader { | ||
return new TranslateHttpLoader(httpClient); | ||
} | ||
|
||
export function tokenGetter(): string | null { | ||
return localStorage.getItem(LOCAL_STORAGE_TOKEN_KEY); | ||
} | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent, | ||
ArpalogoComponent, | ||
LoginComponent, | ||
RegisterComponent, | ||
PerformerComponent, | ||
EmailconfirmationComponent, | ||
StaffComponent, | ||
AdministratorComponent, | ||
MainComponent, | ||
TopbarComponent, | ||
OnboardingShellComponent, | ||
DashboardComponent, | ||
FooterComponent, | ||
ForbiddenComponent, | ||
NotFoundComponent, | ||
NoRoleComponent, | ||
UserListComponent, | ||
LoadingComponent, | ||
LogoutComponent, | ||
ForgotPasswordComponent, | ||
LanguageMenuComponent, | ||
ProfileComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
BrowserAnimationsModule, | ||
ReactiveFormsModule, | ||
HttpClientModule, | ||
FormsModule, | ||
CheckboxModule, | ||
TranslateModule.forRoot({ | ||
loader: { | ||
provide: TranslateLoader, | ||
useFactory: HttpLoaderFactory, | ||
deps: [HttpClient], | ||
}, | ||
}), | ||
AppRoutingModule, | ||
PrimeNgModule, | ||
JwtModule.forRoot({ | ||
config: { | ||
tokenGetter, | ||
allowedDomains: [environment.api.baseUrl], | ||
disallowedRoutes: [], | ||
}, | ||
}), | ||
ToastrModule.forRoot({ | ||
progressBar: true, | ||
positionClass: 'toast-top-full-width' | ||
}), | ||
NgxCaptchaModule, | ||
], | ||
providers: [ | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: WithCredentialsInterceptor, | ||
multi: true, | ||
}, | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: AcceptLanguageInterceptor, | ||
multi: true, | ||
}, | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: ErrorInterceptor, | ||
multi: true, | ||
}, | ||
{ provide: API_URL, useValue: `${environment.api.protocol}://${environment.api.baseUrl}` }, | ||
{ provide: LOCALE_ID, useValue: 'de-de' }, | ||
], | ||
bootstrap: [AppComponent], | ||
}) | ||
export class AppModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"SHORTCUT": "de", | ||
"EMAILADDRESS": "E-Mailadresse", | ||
"USERNAME": "Benutzername", | ||
"GIVENNAME": "Vorname", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"SHORTCUT": "en", | ||
"EMAILADDRESS": "Email address", | ||
"USERNAME": "Username", | ||
"GIVENNAME": "Given name", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das Captcha sollte glaub ich ins Registrierungsformular und nicht ins Login :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hatte mit Michael besprochen dass ich es hier rein mach. Geht aber natürlich auch auf der anderen Seite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brauchen wir das im Login @MichaelSpielmann ? Hätte es jetzt auch eher auf der Registerseite verortet um Spam-Registrierungen zu vermeiden.. beim login is ja wurscht denk ich, oder?