-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12263 from dushaniw/4.3.0-token-persistence
Add changes to internal service and gateway for token revocation events
- Loading branch information
Showing
42 changed files
with
1,650 additions
and
201 deletions.
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
59 changes: 59 additions & 0 deletions
59
...bon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/dto/RevokedEventsDTO.java
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you 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 org.wso2.carbon.apimgt.gateway.dto; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.util.List; | ||
|
||
public class RevokedEventsDTO { | ||
|
||
@SerializedName("revokedJWTList") | ||
private List<RevokedJWTTokenDTO> revokedJWTList; | ||
|
||
@SerializedName("revokedJWTConsumerKeyList") | ||
private List<RevokedJWTConsumerKeyDTO> revokedConsumerKeyList; | ||
|
||
@SerializedName("revokedJWTSubjectEntityList") | ||
private List<RevokedJWTSubjectEntityDTO> revokedJWTSubjectEntityList; | ||
|
||
public List<RevokedJWTTokenDTO> getRevokedJWTList() { | ||
return revokedJWTList; | ||
} | ||
|
||
public void setRevokedJWTList(List<RevokedJWTTokenDTO> revokedJWTList) { | ||
this.revokedJWTList = revokedJWTList; | ||
} | ||
|
||
public List<RevokedJWTConsumerKeyDTO> getRevokedConsumerKeyList() { | ||
return revokedConsumerKeyList; | ||
} | ||
|
||
public void setRevokedConsumerKeyList(List<RevokedJWTConsumerKeyDTO> revokedConsumerKeyList) { | ||
this.revokedConsumerKeyList = revokedConsumerKeyList; | ||
} | ||
|
||
public List<RevokedJWTSubjectEntityDTO> getRevokedSubjectEntityList() { | ||
return revokedJWTSubjectEntityList; | ||
} | ||
|
||
public void setRevokedSubjectEntityList(List<RevokedJWTSubjectEntityDTO> subjectEntityDTOList) { | ||
this.revokedJWTSubjectEntityList = subjectEntityDTOList; | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
...gt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/dto/RevokedJWTConsumerKeyDTO.java
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you 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 org.wso2.carbon.apimgt.gateway.dto; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* DTO of revoked JWT Consumer key. | ||
*/ | ||
public class RevokedJWTConsumerKeyDTO { | ||
|
||
@SerializedName("consumer_key") | ||
private String consumerKey; | ||
@SerializedName("revocation_time") | ||
private Long revocationTime; | ||
@SerializedName("organization") | ||
private String organization; | ||
|
||
public void setRevocationTime(Long revocationTime) { | ||
this.revocationTime = revocationTime; | ||
} | ||
|
||
public Long getRevocationTime() { | ||
return revocationTime; | ||
} | ||
|
||
public String getConsumerKey() { | ||
return consumerKey; | ||
} | ||
|
||
public void setConsumerKey(String consumerKey) { | ||
this.consumerKey = consumerKey; | ||
} | ||
|
||
public String getOrganization() { | ||
return organization; | ||
} | ||
|
||
public void setOrganization(String organization) { | ||
this.organization = organization; | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
....gateway/src/main/java/org/wso2/carbon/apimgt/gateway/dto/RevokedJWTSubjectEntityDTO.java
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you 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 org.wso2.carbon.apimgt.gateway.dto; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* DTO of revoked JWT Subject Entity. | ||
*/ | ||
public class RevokedJWTSubjectEntityDTO { | ||
|
||
@SerializedName("entity_id") | ||
private String entityId; | ||
@SerializedName("entity_type") | ||
private String entityType; | ||
@SerializedName("revocation_time") | ||
private Long revocationTime; | ||
@SerializedName("organization") | ||
private String organization; | ||
|
||
public String getEntityId() { | ||
return entityId; | ||
} | ||
|
||
public void setEntityId(String entityId) { | ||
this.entityId = entityId; | ||
} | ||
|
||
public String getEntityType() { | ||
return entityType; | ||
} | ||
|
||
public void setEntityType(String entityType) { | ||
this.entityType = entityType; | ||
} | ||
|
||
public Long getRevocationTime() { | ||
return revocationTime; | ||
} | ||
|
||
public void setRevocationTime(Long revocationTime) { | ||
this.revocationTime = revocationTime; | ||
} | ||
|
||
public String getOrganization() { | ||
return organization; | ||
} | ||
|
||
public void setOrganization(String organization) { | ||
this.organization = organization; | ||
} | ||
} |
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
Oops, something went wrong.