Skip to content

Commit

Permalink
login authenticate: provide an unique key for each JSONLoginRole
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Dec 4, 2017
1 parent ae0a2aa commit bafa907
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/main/java/de/metas/ui/web/login/json/JSONLoginRole.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
*
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
* #L%
*/
Expand All @@ -41,6 +41,9 @@ public static final JSONLoginRole of(
return new JSONLoginRole(caption, roleId, tenantId, orgId);
}

@JsonProperty("key")
private final String key;

@JsonProperty("caption")
private final String caption;

Expand All @@ -55,28 +58,28 @@ public static final JSONLoginRole of(

private JSONLoginRole(final String caption, final int roleId, final int tenantId, int orgId)
{
super();
this.caption = caption;
this.roleId = roleId;
this.tenantId = tenantId;
this.orgId = orgId;
this.key = roleId + "_" + tenantId + "_" + orgId;
}

public String getCaption()
{
return caption;
}

public int getRoleId()
{
return roleId;
}

public int getTenantId()
{
return tenantId;
}

public int getOrgId()
{
return orgId;
Expand Down

0 comments on commit bafa907

Please sign in to comment.