-
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
Login #15
base: master
Are you sure you want to change the base?
Conversation
docker-compose.yml
Outdated
MYSQL_DATABASE: 'user_service' | ||
|
||
userservice: | ||
build: ~/Documents/ai-testing-org/authentication-service/ |
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.
This should pull from an image
docker-compose.yml
Outdated
depends_on: | ||
- discoveryservice | ||
- rabbitmq | ||
build: ~/go/src/github.com/AITestingOrg/calculation-service/ |
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.
This should pull from an image
docker-compose.yml
Outdated
depends_on: | ||
- discoveryservice | ||
- rabbitmq | ||
build: ~/Documents/ai-testing-org/gmaps-adapter/ |
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.
This should pull from an image
@Injectable() | ||
export class AuthenticationService { | ||
|
||
edgeServiceUrl = `http://localhost:8080/api/userservice/auth/oauth/token`; |
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.
The field name reflects just the edge service, however the full path routes to the user service. Can you update the field name to denote this?
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.
Yes good suggestion
}, | ||
err => { | ||
alert('Invalid credientals'); | ||
console.warn(`Failed to communicated with the user service. Err: ${JSON.stringify(err)}`); |
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.
Those are two unrelated error messages, how can you know if the credentials are invalid if you failed to communicate with the user service?
} | ||
|
||
logout() { | ||
localStorage.clear(); |
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.
You are only using the 'accessToken' item, but you are wiping everything from local storage, can logout just delete what it needs to?
|
||
const inputElem = JSON.stringify({ | ||
'origin': this.pickupInputElementRef.nativeElement.value, | ||
'destination': this.pickupOutputElementRef.nativeElement.value, | ||
'userId': '560c62f4-8612-11e8-adc0-fa7ae01bbebc' | ||
'userId': localStorage.getItem('userId') |
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.
Can we just ask the authentication service for this value via a new function, so we aren't leaking the implementation details?
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.
Yes good suggestion
This file was created for testing purposes only and should not be included in this project.
…to login # Conflicts: # package-lock.json # package.json # src/app/app.module.ts # src/app/common/states/notification.service.ts # src/app/passengers/components/smart/trip-planner/trip-planner.component.ts # yarn.lock
…tibility with angular 6
Changes were made and this user is not available for checking review
Authenticates through edge service instead of directly going to authentication service and gets user id from access token for SSE