Skip to content
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

Correcting the comments by including fullstops #1941

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public String[] registerOAuthConsumer() throws IdentityOAuthAdminException {
* Get all registered OAuth applications for the logged in user.
*
* @return An array of <code>OAuthConsumerAppDTO</code> objecting containing the application
* information of the user
* information of the user.
* @throws IdentityOAuthAdminException Error when reading the data from the persistence store.
*/
public OAuthConsumerAppDTO[] getAllOAuthApplicationData() throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -171,8 +171,8 @@ public OAuthConsumerAppDTO[] getAllOAuthApplicationData() throws IdentityOAuthAd
/**
* Get OAuth application data by the consumer key.
*
* @param consumerKey Consumer Key
* @return <code>OAuthConsumerAppDTO</code> with application information
* @param consumerKey Consumer Key.
* @return <code>OAuthConsumerAppDTO</code> with application information.
* @throws IdentityOAuthAdminException Error when reading application information from persistence store.
*/
public OAuthConsumerAppDTO getOAuthApplicationData(String consumerKey) throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -201,8 +201,8 @@ public OAuthConsumerAppDTO getOAuthApplicationData(String consumerKey) throws Id
/**
* Get OAuth application data by the application name.
*
* @param appName OAuth application name
* @return <code>OAuthConsumerAppDTO</code> with application information
* @param appName OAuth application name.
* @return <code>OAuthConsumerAppDTO</code> with application information.
* @throws IdentityOAuthAdminException Error when reading application information from persistence store.
*/
public OAuthConsumerAppDTO getOAuthApplicationDataByAppName(String appName) throws IdentityOAuthAdminException {
Expand All @@ -228,7 +228,7 @@ public OAuthConsumerAppDTO getOAuthApplicationDataByAppName(String appName) thro
/**
* Registers an OAuth consumer application.
*
* @param application <code>OAuthConsumerAppDTO</code> with application information
* @param application <code>OAuthConsumerAppDTO</code> with application information.
* @throws IdentityOAuthAdminException Error when persisting the application information to the persistence store.
*/
public void registerOAuthApplicationData(OAuthConsumerAppDTO application) throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -550,7 +550,7 @@ public void updateConsumerApplication(OAuthConsumerAppDTO consumerAppDTO) throws

/**
* @return
* @throws IdentityOAuthAdminException
* @throws IdentityOAuthAdminException.
*/
public String getOauthApplicationState(String consumerKey) throws IdentityOAuthAdminException {

Expand All @@ -560,7 +560,7 @@ public String getOauthApplicationState(String consumerKey) throws IdentityOAuthA
/**
* To insert oidc scopes and claims in the related db tables.
*
* @param scope an oidc scope
* @param scope an oidc scope.
* @throws IdentityOAuthAdminException if an error occurs when inserting scopes or claims.
* @deprecated use {@link #addScope(ScopeDTO)} instead.
*/
Expand Down Expand Up @@ -602,7 +602,7 @@ public void addScope(ScopeDTO scope) throws IdentityOAuthAdminException {
/**
* To retrieve all persisted oidc scopes with mapped claims.
*
* @return all persisted scopes and claims
* @return all persisted scopes and claims.
* @throws IdentityOAuthAdminException if an error occurs when loading scopes and claims.
*/
public ScopeDTO[] getScopes() throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -655,7 +655,7 @@ public ScopeDTO getScope(String scopeName) throws IdentityOAuthAdminException {
/**
* To remove persisted scopes and claims.
*
* @param scope oidc scope
* @param scope oidc scope.
* @throws IdentityOAuthAdminException if an error occurs when deleting scopes and claims.
*/
public void deleteScope(String scope) throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -703,7 +703,7 @@ public String[] getScopeNames() throws IdentityOAuthAdminException {
/**
* To retrieve oidc claims mapped to an oidc scope.
*
* @param scope scope
* @param scope scope.
* @return list of claims which are mapped to the oidc scope.
* @throws IdentityOAuthAdminException if an error occurs when lading oidc claims.
*/
Expand All @@ -730,8 +730,8 @@ public String[] getClaims(String scope) throws IdentityOAuthAdminException {
* To add new claims for an existing scope.
*
* @param scope scope name
* @param addClaims list of oidc claims to be added
* @param deleteClaims list of oidc claims to be deleted
* @param addClaims list of oidc claims to be added.
* @param deleteClaims list of oidc claims to be deleted.
* @throws IdentityOAuthAdminException if an error occurs when adding a new claim for a scope.
* @deprecated use {@link #updateScope(ScopeDTO)} instead.
*/
Expand Down Expand Up @@ -774,8 +774,8 @@ public void updateScope(ScopeDTO updatedScope) throws IdentityOAuthAdminExceptio
/**
* To load id of the scope table.
*
* @param scope scope name
* @return id of the given scope
* @param scope scope name.
* @return id of the given scope.
* @throws IdentityOAuthAdminException if an error occurs when loading scope id.
*/
public boolean isScopeExist(String scope) throws IdentityOAuthAdminException {
Expand All @@ -789,8 +789,8 @@ public boolean isScopeExist(String scope) throws IdentityOAuthAdminException {
}

/**
* @param consumerKey
* @param newState
* @param consumerKey.
* @param newState.
* @throws IdentityOAuthAdminException
*/
public void updateConsumerAppState(String consumerKey, String newState) throws IdentityOAuthAdminException {
Expand All @@ -802,7 +802,7 @@ public void updateConsumerAppState(String consumerKey, String newState) throws I

try {
OAuthAppDO oAuthAppDO = getOAuthApp(consumerKey);
// change the state
// change the state.
oAuthAppDO.setState(newState);

Properties properties = new Properties();
Expand Down Expand Up @@ -931,7 +931,7 @@ void updateAppAndRevokeTokensAndAuthzCodes(String consumerKey,
/**
* Removes an OAuth consumer application.
*
* @param consumerKey Consumer Key
* @param consumerKey Consumer Key.
* @throws IdentityOAuthAdminException Error when removing the consumer information from the database.
*/
public void removeOAuthApplicationData(String consumerKey) throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -982,8 +982,8 @@ public void removeOAuthApplicationData(String consumerKey) throws IdentityOAuthA
/**
* Remove all OAuth consumer applications of a tenant.
*
* @param tenantId Id of the tenant
* @throws IdentityOAuthAdminException
* @param tenantId Id of the tenant.
* @throws IdentityOAuthAdminException.
*/
public void removeAllOAuthApplicationData(int tenantId) throws IdentityOAuthAdminException {

Expand All @@ -996,9 +996,9 @@ public void removeAllOAuthApplicationData(int tenantId) throws IdentityOAuthAdmi
}

/**
* Get apps that are authorized by the given user
* Get apps that are authorized by the given user.
*
* @return OAuth applications authorized by the user that have tokens in ACTIVE or EXPIRED state
* @return OAuth applications authorized by the user that have tokens in ACTIVE or EXPIRED state.
*/
public OAuthConsumerAppDTO[] getAppsAuthorizedByUser() throws IdentityOAuthAdminException {

Expand Down Expand Up @@ -1091,10 +1091,10 @@ private OAuthAppDO getOAuthAppDO(String consumerKey) throws IdentityOAuthAdminEx
}

/**
* Revoke authorization for OAuth apps by resource owners
* Revoke authorization for OAuth apps by resource owners.
*
* @param revokeRequestDTO DTO representing authorized user and apps[]
* @return revokeRespDTO DTO representing success or failure message
* @return revokeRespDTO DTO representing success or failure message.
*/
public OAuthRevocationResponseDTO revokeAuthzForAppsByResourceOwner(
OAuthRevocationRequestDTO revokeRequestDTO) throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -1131,7 +1131,7 @@ public OAuthRevocationResponseDTO revokeAuthzForAppsByResourceOwner(
if (appDTO.getApplicationName().equals(appName)) {
Set<AccessTokenDO> accessTokenDOs;
try {
// Retrieve all ACTIVE or EXPIRED access tokens for particular client authorized by this
// Retrieve all ACTIVE or EXPIRED access tokens for particular client authorized by this.
// user
accessTokenDOs = OAuthTokenPersistenceFactory.getInstance()
.getAccessTokenDAO().getAccessTokens(
Expand All @@ -1143,7 +1143,7 @@ public OAuthRevocationResponseDTO revokeAuthzForAppsByResourceOwner(
}
AuthenticatedUser authzUser;
for (AccessTokenDO accessTokenDO : accessTokenDOs) {
//Clear cache with AccessTokenDO
//Clear cache with AccessTokenDO.
authzUser = accessTokenDO.getAuthzUser();

String tokenBindingReference = NONE;
Expand Down Expand Up @@ -1176,7 +1176,7 @@ public OAuthRevocationResponseDTO revokeAuthzForAppsByResourceOwner(
throw handleError(errorMsg, e);
}
if (scopedToken != null) {
//Revoking token from database
//Revoking token from database.
try {
OAuthTokenPersistenceFactory.getInstance().getAccessTokenDAO()
.revokeAccessTokens(new String[]{scopedToken
Expand Down Expand Up @@ -1210,7 +1210,7 @@ public OAuthRevocationResponseDTO revokeAuthzForAppsByResourceOwner(
revokeRespDTO.setErrorCode(OAuth2ErrorCodes.INVALID_REQUEST);
revokeRespDTO.setErrorMsg("Invalid revocation request");

//passing a single element array with null element to make sure listeners are triggered at least once
//passing a single element array with null element to make sure listeners are triggered at least once.
triggerPostRevokeListeners(revokeRequestDTO, revokeRespDTO, new AccessTokenDO[]{null});
return revokeRespDTO;
}
Expand All @@ -1222,7 +1222,7 @@ public OAuthRevocationResponseDTO revokeAuthzForAppsByResourceOwner(
*
* @param application {@link OAuthAppRevocationRequestDTO}
* @return revokeRespDTO {@link OAuthAppRevocationRequestDTO}
* @throws IdentityOAuthAdminException Error while revoking the issued tokens
* @throws IdentityOAuthAdminException Error while revoking the issued tokens.
*/
public OAuthRevocationResponseDTO revokeIssuedTokensByApplication(OAuthAppRevocationRequestDTO application)
throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -1264,11 +1264,11 @@ public OAuthRevocationResponseDTO revokeIssuedTokensByApplication(OAuthAppRevoca
}

/**
* Revoke approve always of the consent for OAuth apps by resource owners
* Revoke approve always of the consent for OAuth apps by resource owners.
*
* @param appName name of the app
* @param state state of the approve always
* @return revokeRespDTO DTO representing success or failure message
* @param appName name of the app.
* @param state state of the approve always.
* @return revokeRespDTO DTO representing success or failure message.
*/
public OAuthRevocationResponseDTO updateApproveAlwaysForAppConsentByResourceOwner(String appName, String state)
throws IdentityOAuthAdminException {
Expand Down Expand Up @@ -1508,7 +1508,7 @@ public String[] getAllowedScopeValidators() {
/**
* Get the registered oauth token types from OAuth server configuration file.
*
* @return List of supported oauth token types
* @return List of supported oauth token types.
*/
public List<String> getSupportedTokenTypes() {

Expand All @@ -1526,15 +1526,15 @@ public String getDefaultTokenType() {
/**
* Get the renew refresh token property value from identity.xml file.
*
* @return renew refresh token property value
* @return renew refresh token property value.
*/
public boolean isRefreshTokenRenewalEnabled() {

return OAuthServerConfiguration.getInstance().isRefreshTokenRenewalEnabled();
}

/**
* @return true if PKCE is supported by the database, false if not
* @return true if PKCE is supported by the database, false if not.
*/
public boolean isPKCESupportEnabled() {

Expand Down Expand Up @@ -1640,8 +1640,8 @@ String[] filterScopeValidators(OAuthConsumerAppDTO application) throws IdentityO
/**
* Get the IdToken Encryption Method registered by the user and filter the allowed one.
*
* @param application Application user have registered
* @return idTokenEncryptionMethod
* @param application Application user have registered.
* @return idTokenEncryptionMethod.
* @throws IdentityOAuthAdminException Identity OAuthAdmin exception.
*/
private String filterIdTokenEncryptionMethod(OAuthConsumerAppDTO application) throws IdentityOAuthAdminException {
Expand All @@ -1659,8 +1659,8 @@ private String filterIdTokenEncryptionMethod(OAuthConsumerAppDTO application) th
/**
* Get the IdToken Encryption Algorithm registered by the user and filter the allowed one.
*
* @param application Application user have registered
* @return idTokenEncryptionAlgorithm
* @param application Application user have registere.
* @return idTokenEncryptionAlgorithm.
* @throws IdentityOAuthAdminException Identity OAuthAdmin exception.
*/
private String filterIdTokenEncryptionAlgorithm(OAuthConsumerAppDTO application)
Expand Down Expand Up @@ -1766,7 +1766,7 @@ OAuthAppDO getOAuthApp(String consumerKey) throws InvalidOAuthClientException, I
* Scope validation before adding the scope.
*
* @param scope Scope.
* @throws IdentityOAuth2ScopeClientException
* @throws IdentityOAuth2ScopeClientException.
*/
private void addScopePreValidation(ScopeDTO scope) throws IdentityOAuthClientException {

Expand All @@ -1779,7 +1779,7 @@ private void addScopePreValidation(ScopeDTO scope) throws IdentityOAuthClientExc
* Do the validation before updating the scope.
*
* @param updatedScope Updated scope.
* @throws IdentityOAuth2ScopeClientException
* @throws IdentityOAuth2ScopeClientException.
*/
private void updateScopePreValidation(ScopeDTO updatedScope) throws IdentityOAuthClientException {

Expand All @@ -1791,7 +1791,7 @@ private void updateScopePreValidation(ScopeDTO updatedScope) throws IdentityOAut
* Check whether scope name is provided or not.
*
* @param scopeName Scope name.
* @throws IdentityOAuth2ScopeClientException
* @throws IdentityOAuth2ScopeClientException.
*/
private void validateScopeName(String scopeName) throws IdentityOAuthClientException {

Expand All @@ -1817,7 +1817,7 @@ private void validateRegex(String scopeName) throws IdentityOAuthClientException
* Check whether scope name contains any white spaces.
*
* @param scopeName Scope name.
* @throws IdentityOAuth2ScopeClientException
* @throws IdentityOAuth2ScopeClientException.
*/
private void validateWhiteSpaces(String scopeName) throws IdentityOAuthClientException {

Expand All @@ -1836,7 +1836,7 @@ private void validateWhiteSpaces(String scopeName) throws IdentityOAuthClientExc
* Check whether display name is provided or empty.
*
* @param displayName Display name.
* @throws IdentityOAuth2ScopeClientException
* @throws IdentityOAuth2ScopeClientException.
*/
private void validateDisplayName(String displayName) throws IdentityOAuthClientException {

Expand All @@ -1852,7 +1852,7 @@ private void validateDisplayName(String displayName) throws IdentityOAuthClientE
* Check whether scope exist or not, if scope does not exist trow not found error.
*
* @param scopeName Scope name.
* @throws IdentityOAuth2ScopeException
* @throws IdentityOAuth2ScopeException.
*/
private void validateScopeExistence(String scopeName) throws IdentityOAuthAdminException {

Expand Down