-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:openremote/openremote
- Loading branch information
Showing
41 changed files
with
1,367 additions
and
196 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,4 +62,4 @@ dependencies { | |
|
||
jar { | ||
archivesBaseName = "openremote-${project.name}" | ||
} | ||
} |
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
43 changes: 43 additions & 0 deletions
43
container/src/main/java/org/openremote/container/security/ClientCredentialsAuthForm.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,43 @@ | ||
/* | ||
* Copyright 2020, OpenRemote Inc. | ||
* | ||
* See the CONTRIBUTORS.txt file in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.openremote.container.security; | ||
|
||
import javax.ws.rs.FormParam; | ||
|
||
public class ClientCredentialsAuthForm extends AuthForm { | ||
|
||
@FormParam("client_secret") | ||
public String clientSecret; | ||
|
||
public ClientCredentialsAuthForm setClientSecret(String clientSecret) { | ||
this.clientSecret = clientSecret; | ||
return this; | ||
} | ||
|
||
public ClientCredentialsAuthForm(String clientId, String clientSecret) { | ||
this(clientId, clientSecret, "client_credentials"); | ||
} | ||
|
||
public ClientCredentialsAuthForm(String clientId, String clientSecret, String grantType) { | ||
this.clientId = clientId; | ||
this.clientSecret = clientSecret; | ||
this.grantType = grantType; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
container/src/main/java/org/openremote/container/security/PasswordAuthForm.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,53 @@ | ||
/* | ||
* Copyright 2020, OpenRemote Inc. | ||
* | ||
* See the CONTRIBUTORS.txt file in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.openremote.container.security; | ||
|
||
import javax.ws.rs.FormParam; | ||
|
||
public class PasswordAuthForm extends AuthForm { | ||
|
||
@FormParam("username") | ||
public String username; | ||
|
||
@FormParam("password") | ||
public String password; | ||
|
||
public PasswordAuthForm setUsername(String username) { | ||
this.username = username; | ||
return this; | ||
} | ||
|
||
public PasswordAuthForm setPassword(String password) { | ||
this.password = password; | ||
return this; | ||
} | ||
|
||
public PasswordAuthForm(String clientId, String username, String password) { | ||
this(clientId, username, password, "password"); | ||
} | ||
|
||
public PasswordAuthForm(String clientId, String username, String password, String grantType) { | ||
this.clientId = clientId; | ||
this.username = username; | ||
this.password = password; | ||
this.grantType = grantType; | ||
} | ||
} | ||
|
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
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.