-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresing the review comment of using a seperate object for federated…
… token in oauth
- Loading branch information
Showing
5 changed files
with
132 additions
and
20 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
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
87 changes: 87 additions & 0 deletions
87
....identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/model/FederatedTokenDO.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,87 @@ | ||
/* | ||
* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. | ||
* | ||
* This software is the property of WSO2 LLC. and its suppliers, if any. | ||
* Dissemination of any information or reproduction of any material contained | ||
* herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
* You may not alter or remove any copyright or other notice from copies of this content. | ||
* | ||
*/ | ||
|
||
package org.wso2.carbon.identity.oauth2.model; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* This class is model class of a federated token. | ||
* A federated token is an external token obtained via an OIDC federated authenticator | ||
* after a successful authentication. | ||
*/ | ||
public class FederatedTokenDO implements Serializable { | ||
|
||
private static final long serialVersionUID = 2717725650850067925L; | ||
private String idp; | ||
private String tokenValidityPeriod; | ||
private String scope; | ||
private String accessToken; | ||
private String refreshToken; | ||
|
||
// Constructor | ||
public FederatedTokenDO(String idp, String accessToken) { | ||
|
||
this.idp = idp; | ||
this.accessToken = accessToken; | ||
} | ||
|
||
// Getters and setters | ||
public String getIdp() { | ||
|
||
return idp; | ||
} | ||
|
||
public void setIdp(String idp) { | ||
|
||
this.idp = idp; | ||
} | ||
|
||
public String getTokenValidityPeriod() { | ||
|
||
return tokenValidityPeriod; | ||
} | ||
|
||
public void setTokenValidityPeriod(String tokenValidityPeriod) { | ||
|
||
this.tokenValidityPeriod = tokenValidityPeriod; | ||
} | ||
|
||
public String getScope() { | ||
|
||
return scope; | ||
} | ||
|
||
public void setScope(String scope) { | ||
|
||
this.scope = scope; | ||
} | ||
|
||
public String getAccessToken() { | ||
|
||
return accessToken; | ||
} | ||
|
||
public void setAccessToken(String accessToken) { | ||
|
||
this.accessToken = accessToken; | ||
} | ||
|
||
public String getRefreshToken() { | ||
|
||
return refreshToken; | ||
} | ||
|
||
public void setRefreshToken(String refreshToken) { | ||
|
||
this.refreshToken = refreshToken; | ||
} | ||
} |
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