Skip to content

Commit 42f18c7

Browse files
committed
Move SAML nested types to internal package.
1 parent 8914e90 commit 42f18c7

File tree

2 files changed

+84
-48
lines changed

2 files changed

+84
-48
lines changed

src/main/java/com/google/firebase/auth/SamlProviderConfig.java

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
import com.google.common.collect.ImmutableMap;
2525
import com.google.firebase.auth.ProviderConfig.AbstractCreateRequest;
2626
import com.google.firebase.auth.ProviderConfig.AbstractUpdateRequest;
27+
import com.google.firebase.auth.internal.SamlProviderConfigResponse.IdpCertificate;
28+
import com.google.firebase.auth.internal.SamlProviderConfigResponse.IdpConfig;
29+
import com.google.firebase.auth.internal.SamlProviderConfigResponse.SpConfig;
30+
import java.util.ArrayList;
31+
import java.util.HashMap;
2732
import java.util.List;
2833
import java.util.Map;
2934

@@ -179,52 +184,4 @@ void assertValidProviderIdFormat(String providerId) {
179184
checkArgument(providerId.startsWith("saml."), "Invalid SAML provider ID: " + providerId);
180185
}
181186
}
182-
183-
static class IdpCertificate {
184-
@Key("x509Certificate")
185-
private String x509Certificate;
186-
187-
public String getX509Certificate() {
188-
return x509Certificate;
189-
}
190-
}
191-
192-
static class IdpConfig {
193-
@Key("idpEntityId")
194-
private String idpEntityId;
195-
196-
@Key("ssoUrl")
197-
private String ssoUrl;
198-
199-
@Key("idpCertificates")
200-
private List<IdpCertificate> idpCertificates;
201-
202-
public String getIdpEntityId() {
203-
return idpEntityId;
204-
}
205-
206-
public String getSsoUrl() {
207-
return ssoUrl;
208-
}
209-
210-
public List<IdpCertificate> getIdpCertificates() {
211-
return idpCertificates;
212-
}
213-
}
214-
215-
static class SpConfig {
216-
@Key("spEntityId")
217-
private String rpEntityId;
218-
219-
@Key("callbackUri")
220-
private String callbackUrl;
221-
222-
public String getRpEntityId() {
223-
return rpEntityId;
224-
}
225-
226-
public String getCallbackUrl() {
227-
return callbackUrl;
228-
}
229-
}
230187
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright 2020 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.firebase.auth.internal;
18+
19+
import static com.google.common.base.Preconditions.checkArgument;
20+
21+
import com.google.api.client.util.Key;
22+
import java.util.List;
23+
import java.util.Map;
24+
25+
/**
26+
* Contains nested SAML provider config response messages sent by Google identity toolkit service.
27+
*/
28+
public final class SamlProviderConfigResponse {
29+
30+
public static class IdpCertificate {
31+
@Key("x509Certificate")
32+
private String x509Certificate;
33+
34+
public String getX509Certificate() {
35+
return x509Certificate;
36+
}
37+
}
38+
39+
public static class IdpConfig {
40+
@Key("idpEntityId")
41+
private String idpEntityId;
42+
43+
@Key("ssoUrl")
44+
private String ssoUrl;
45+
46+
@Key("idpCertificates")
47+
private List<IdpCertificate> idpCertificates;
48+
49+
public String getIdpEntityId() {
50+
return idpEntityId;
51+
}
52+
53+
public String getSsoUrl() {
54+
return ssoUrl;
55+
}
56+
57+
public List<IdpCertificate> getIdpCertificates() {
58+
return idpCertificates;
59+
}
60+
}
61+
62+
public static class SpConfig {
63+
@Key("spEntityId")
64+
private String rpEntityId;
65+
66+
@Key("callbackUri")
67+
private String callbackUrl;
68+
69+
public String getRpEntityId() {
70+
return rpEntityId;
71+
}
72+
73+
public String getCallbackUrl() {
74+
return callbackUrl;
75+
}
76+
}
77+
78+
private SamlProviderConfigResponse() { }
79+
}

0 commit comments

Comments
 (0)