-
Notifications
You must be signed in to change notification settings - Fork 5
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
issue-1589 #28
issue-1589 #28
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2018-2020, FusionAuth, All Rights Reserved | ||
* Copyright (c) 2018-2022, FusionAuth, All Rights Reserved | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like we have the wrong copyright here, can you update this to the Apache license. |
||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -50,6 +50,10 @@ public enum EventType { | |
|
||
UserCreateComplete("user.create.complete"), | ||
|
||
UserIdentityProviderLink("user.idp.link"), | ||
|
||
UserIdentityProviderUnlink("user.idp.unlink"), | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
UserDeactivate("user.deactivate"), | ||
|
||
UserDelete("user.delete"), | ||
|
@@ -135,6 +139,8 @@ public static List<EventType> allTypes() { | |
EventType.UserDeleteComplete, | ||
EventType.UserEmailUpdate, | ||
EventType.UserEmailVerified, | ||
EventType.UserIdentityProviderLink, | ||
EventType.UserIdentityProviderUnlink, | ||
EventType.UserLoginIdDuplicateOnCreate, | ||
EventType.UserLoginIdDuplicateOnUpdate, | ||
EventType.UserLoginFailed, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (c) 2019-2022, FusionAuth, All Rights Reserved | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a new class, should be |
||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific | ||
* language governing permissions and limitations under the License. | ||
*/ | ||
package io.fusionauth.domain.event; | ||
|
||
import com.inversoft.json.JacksonConstructor; | ||
import com.inversoft.json.ToString; | ||
import io.fusionauth.domain.Buildable; | ||
import io.fusionauth.domain.EventInfo; | ||
import io.fusionauth.domain.User; | ||
|
||
/** | ||
* Models the User IdP Link Event. | ||
* | ||
* @author Rob Davis | ||
*/ | ||
public class UserIdentityProviderLinkEvent extends BaseEvent implements Buildable<UserIdentityProviderLinkEvent>, NonTransactionalEvent { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing |
||
public String identityProviderName; | ||
|
||
public User user; | ||
|
||
@JacksonConstructor | ||
public UserIdentityProviderLinkEvent() { | ||
} | ||
|
||
public UserIdentityProviderLinkEvent(EventInfo info, String identityProviderName, User user) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is fine if we add the name, but the event needs to for sure contain the IdP Id. It seems that we should also include details about the link itself. Should we be adding the entire link object? Or at least the IdP user unique Id, IdP user display name if we have it, the FusionAuth IdP link Id, etc. We need to assume someone wants to consume this event and then use it to create FKs, or call back to FusionAuth and be able to retrieve specific information. |
||
super(info); | ||
this.identityProviderName = identityProviderName; | ||
this.user = user; | ||
} | ||
|
||
@Override | ||
public EventType getType() { | ||
return EventType.UserIdentityProviderLink; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToString.toString(this); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (c) 2019-2022, FusionAuth, All Rights Reserved | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2022 |
||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific | ||
* language governing permissions and limitations under the License. | ||
*/ | ||
package io.fusionauth.domain.event; | ||
|
||
import com.inversoft.json.JacksonConstructor; | ||
import com.inversoft.json.ToString; | ||
import io.fusionauth.domain.Buildable; | ||
import io.fusionauth.domain.EventInfo; | ||
import io.fusionauth.domain.User; | ||
|
||
/** | ||
* Models the User IdP Unlink Event. | ||
* | ||
* @author Rob Davis | ||
*/ | ||
public class UserIdentityProviderUnlinkEvent extends BaseEvent implements Buildable<UserIdentityProviderUnlinkEvent>, NonTransactionalEvent { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Equals, hashcode. |
||
public String identityProviderName; | ||
|
||
public User user; | ||
|
||
@JacksonConstructor | ||
public UserIdentityProviderUnlinkEvent() { | ||
} | ||
|
||
public UserIdentityProviderUnlinkEvent(EventInfo info, String identityProviderName, User user) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment form the link event, we should add more details to this event. |
||
super(info); | ||
this.identityProviderName = identityProviderName; | ||
this.user = user; | ||
} | ||
|
||
@Override | ||
public EventType getType() { | ||
return EventType.UserIdentityProviderLink; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the wrong type. |
||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToString.toString(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.
Looks like we have the wrong copyright here, can you update this to the Apache license.