2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.enphase.internal.dto;
16 * Data class for Enphase Entrez Portal.
18 * @author Joe Inkenbrandt - Initial contribution
20 public class EntrezJwtDTO {
22 public class EntrezJwtHeaderDTO {
27 public String getKid() {
31 public void setKid(final String kid) {
35 public String getTyp() {
39 public void setTyp(final String typ) {
43 public String getAlg() {
47 public void setAlg(final String alg) {
52 public class EntrezJwtBodyDTO {
55 private String enphaseUser;
59 private String username;
61 public String getAud() {
65 public void setAud(final String aud) {
69 public String getIss() {
73 public void setIss(final String iss) {
77 public String getEnphaseUser() {
81 public void setEnphaseUser(final String enphaseUser) {
82 this.enphaseUser = enphaseUser;
85 public Long getExp() {
89 public void setExp(final Long exp) {
93 public Long getIat() {
97 public void setIat(final Long iat) {
101 public String getJti() {
105 public void setJti(final String jti) {
109 public String getUsername() {
113 public void setUsername(final String username) {
114 this.username = username;
118 private final EntrezJwtHeaderDTO header;
119 private final EntrezJwtBodyDTO body;
121 public EntrezJwtDTO(final EntrezJwtHeaderDTO header, final EntrezJwtBodyDTO body) {
122 this.header = header;
126 public boolean isValid() {
127 return header == null || body == null;
130 public EntrezJwtBodyDTO getBody() {
134 public EntrezJwtHeaderDTO getHeader() {