View Javadoc
1   /*
2    * Copyright (C) 2023 B3Partners B.V.
3    *
4    * SPDX-License-Identifier: MIT
5    */
6   package org.tailormap.api.persistence;
7   
8   import jakarta.persistence.Entity;
9   import jakarta.persistence.EntityListeners;
10  import jakarta.persistence.GeneratedValue;
11  import jakarta.persistence.GenerationType;
12  import jakarta.persistence.Id;
13  import jakarta.persistence.Version;
14  import jakarta.validation.constraints.NotNull;
15  import org.tailormap.api.persistence.listener.EntityEventPublisher;
16  
17  @Entity
18  @EntityListeners(EntityEventPublisher.class)
19  public class OIDCConfiguration {
20    @Id
21    @GeneratedValue(strategy = GenerationType.IDENTITY)
22    private Long id;
23  
24    @Version private Long version;
25  
26    @NotNull private String name;
27  
28    @NotNull private String clientId;
29  
30    private String clientSecret;
31  
32    @NotNull private String issuerUrl;
33  
34    @NotNull private String userNameAttribute;
35  
36    private String status;
37  
38    public Long getId() {
39      return id;
40    }
41  
42    public OIDCConfiguration setId(Long id) {
43      this.id = id;
44      return this;
45    }
46  
47    public Long getVersion() {
48      return version;
49    }
50  
51    public OIDCConfiguration setVersion(Long version) {
52      this.version = version;
53      return this;
54    }
55  
56    public String getName() {
57      return name;
58    }
59  
60    public OIDCConfiguration setName(String name) {
61      this.name = name;
62      return this;
63    }
64  
65    public String getClientId() {
66      return clientId;
67    }
68  
69    public OIDCConfiguration setClientId(String clientId) {
70      this.clientId = clientId;
71      return this;
72    }
73  
74    public String getClientSecret() {
75      return clientSecret;
76    }
77  
78    public OIDCConfiguration setClientSecret(String clientSecret) {
79      this.clientSecret = clientSecret;
80      return this;
81    }
82  
83    public String getIssuerUrl() {
84      return issuerUrl;
85    }
86  
87    public OIDCConfiguration setIssuerUrl(String issuerUrl) {
88      this.issuerUrl = issuerUrl;
89      return this;
90    }
91  
92    public String getUserNameAttribute() {
93      return userNameAttribute;
94    }
95  
96    public OIDCConfiguration setUserNameAttribute(String userNameAttribute) {
97      this.userNameAttribute = userNameAttribute;
98      return this;
99    }
100 
101   public String getStatus() {
102     return status;
103   }
104 
105   public OIDCConfiguration setStatus(String status) {
106     this.status = status;
107     return this;
108   }
109 }