2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.ccsdk.features.sdnr.wt.oauthprovider.data;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import java.util.List;
31 "jti": "09bd6f2c-5dba-44a0-bd76-cd0d440137d0",
32 "iss": "http://10.20.11.160:8080/auth/realms/onap",
34 "sub": "446a24bc-d8a0-43dd-afa5-e56eed75deb8",
37 "session_state": "db2c96f4-cc9b-47e8-a83f-a01c50d656f2",
50 "manage-account-links",
55 "scope": "profile email",
56 "email_verified": false,
57 "name": "Luke Skywalker",
58 "preferred_username": "luke.skywalker",
60 "family_name": "Skywalker",
61 "email": "luke.skywalker@sdnr.onap.org"
66 public class KeycloakUserTokenPayload {
76 @JsonProperty("session_state")
77 private String sessionState;
79 @JsonProperty("realm_access")
80 private RealmAccessData realmAccess;
81 @JsonProperty("resource_access")
82 private ResourceAccessData resourceAccess;
84 @JsonProperty("email_verified")
85 private String emailVerified;
87 @JsonProperty("preferred_username")
88 private String preferredUsername;
89 @JsonProperty("given_name")
90 private String givenName;
91 @JsonProperty("family_name")
92 private String familyName;
95 public long getExp() {
98 public void setExp(long exp) {
101 public long getIat() {
104 public void setIat(long iat) {
107 public String getJti() {
110 public void setJti(String jti) {
113 public String getIss() {
116 public void setIss(String iss) {
119 public String getAud() {
122 public void setAud(String aud) {
125 public String getSub() {
128 public void setSub(String sub) {
131 public String getTyp() {
134 public void setTyp(String typ) {
137 public String getAzp() {
140 public void setAzp(String azp) {
143 public String getSessionState() {
146 public void setSessionState(String sessionState) {
147 this.sessionState = sessionState;
149 public String getAcr() {
152 public void setAcr(String acr) {
155 public RealmAccessData getRealmAccess() {
158 public void setRealmAccess(RealmAccessData realmAccess) {
159 this.realmAccess = realmAccess;
161 public ResourceAccessData getResourceAccess() {
162 return resourceAccess;
164 public void setResourceAccess(ResourceAccessData resourceAccess) {
165 this.resourceAccess = resourceAccess;
167 public String getScope() {
170 public void setScope(String scope) {
173 public String getEmailVerified() {
174 return emailVerified;
176 public void setEmailVerified(String emailVerified) {
177 this.emailVerified = emailVerified;
179 public String getName() {
182 public void setName(String name) {
185 public String getPreferredUsername() {
186 return preferredUsername;
188 public void setPreferredUsername(String preferredUsername) {
189 this.preferredUsername = preferredUsername;
191 public String getGivenName() {
194 public void setGivenName(String givenName) {
195 this.givenName = givenName;
197 public String getFamilyName() {
200 public void setFamilyName(String familyName) {
201 this.familyName = familyName;
203 public String getEmail() {
206 public void setEmail(String email) {
211 public static class RealmAccessData {
212 private List<String> roles;
214 public List<String> getRoles(){
217 public void setRoles(List<String> roles) {
221 public static class ResourceAccessData {
222 private RealmAccessData account;
224 public RealmAccessData getAccount() {
227 public void setAccount(RealmAccessData account) {
228 this.account = account;