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
25    private Long version;
26  
27    @NotNull private String name;
28  
29    @NotNull private String clientId;
30  
31    private String clientSecret;
32  
33    @NotNull private String issuerUrl;
34  
35    @NotNull private String userNameAttribute;
36  
37    private String status;
38  
39    public Long getId() {
40      return id;
41    }
42  
43    public OIDCConfiguration setId(Long id) {
44      this.id = id;
45      return this;
46    }
47  
48    public Long getVersion() {
49      return version;
50    }
51  
52    public OIDCConfiguration setVersion(Long version) {
53      this.version = version;
54      return this;
55    }
56  
57    public String getName() {
58      return name;
59    }
60  
61    public OIDCConfiguration setName(String name) {
62      this.name = name;
63      return this;
64    }
65  
66    public String getClientId() {
67      return clientId;
68    }
69  
70    public OIDCConfiguration setClientId(String clientId) {
71      this.clientId = clientId;
72      return this;
73    }
74  
75    public String getClientSecret() {
76      return clientSecret;
77    }
78  
79    public OIDCConfiguration setClientSecret(String clientSecret) {
80      this.clientSecret = clientSecret;
81      return this;
82    }
83  
84    public String getIssuerUrl() {
85      return issuerUrl;
86    }
87  
88    public OIDCConfiguration setIssuerUrl(String issuerUrl) {
89      this.issuerUrl = issuerUrl;
90      return this;
91    }
92  
93    public String getUserNameAttribute() {
94      return userNameAttribute;
95    }
96  
97    public OIDCConfiguration setUserNameAttribute(String userNameAttribute) {
98      this.userNameAttribute = userNameAttribute;
99      return this;
100   }
101 
102   public String getStatus() {
103     return status;
104   }
105 
106   public OIDCConfiguration setStatus(String status) {
107     this.status = status;
108     return this;
109   }
110 }