-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create credential reset method, entities, and endpoint
- Loading branch information
Showing
20 changed files
with
264 additions
and
36 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
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
45 changes: 45 additions & 0 deletions
45
...c/main/resources/openapi/userCredentials/userCredentials-scopeId-credentialId-_reset.yaml
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,45 @@ | ||
openapi: 3.0.2 | ||
|
||
info: | ||
title: Eclipse Kapua REST API - Credential | ||
version: '1.0' | ||
contact: | ||
name: Eclipse Kapua Dev Team | ||
url: https://eclipse.org/kapua | ||
email: kapua-dev@eclipse.org | ||
license: | ||
name: Eclipse Public License 2.0 | ||
url: https://www.eclipse.org/legal/epl-2.0 | ||
|
||
paths: | ||
/{scopeId}/user/credentials/{credentialId}/_reset: | ||
post: | ||
tags: | ||
- User Credentials | ||
summary: Reset the password of a Credential | ||
operationId: credentialPasswordReset | ||
parameters: | ||
- $ref: '../openapi.yaml#/components/parameters/scopeId' | ||
- $ref: '../credential/credential.yaml#/components/parameters/credentialId' | ||
requestBody: | ||
description: The new password | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './userCredentials.yaml#/components/schemas/passwordResetRequest' | ||
required: true | ||
responses: | ||
204: | ||
description: The updated Credential | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../credential/credential.yaml#/components/schemas/credential' | ||
401: | ||
$ref: '../openapi.yaml#/components/responses/unauthenticated' | ||
403: | ||
$ref: '../openapi.yaml#/components/responses/subjectUnauthorized' | ||
404: | ||
$ref: '../openapi.yaml#/components/responses/entityNotFound' | ||
500: | ||
$ref: '../openapi.yaml#/components/responses/kapuaError' |
File renamed without changes.
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
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
31 changes: 31 additions & 0 deletions
31
...api/src/main/java/org/eclipse/kapua/service/authentication/user/PasswordResetRequest.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,31 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023, 2022 Eurotech and/or its affiliates and others | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Eurotech - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.kapua.service.authentication.user; | ||
|
||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
@XmlRootElement | ||
@XmlAccessorType(XmlAccessType.PROPERTY) | ||
@XmlType(factoryClass = UserCredentialsXmlRegistry.class, factoryMethod = "newPasswordResetRequest") | ||
public interface PasswordResetRequest { | ||
@XmlElement(name = "newPassword") | ||
String getNewPassword(); | ||
|
||
|
||
void setNewPassword(String newPassword); | ||
} |
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
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
Oops, something went wrong.