Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit a619e65

Browse files
committed
Merge branch '1.3.x' into AM-3581-social-login-v2
2 parents c3289e4 + ad58f11 commit a619e65

File tree

70 files changed

+5189
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+5189
-20
lines changed

api/src/main/java/com/stormpath/sdk/application/ApplicationOptions.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,14 @@ public interface ApplicationOptions<T> extends AccountStoreOptions<T> {
7979
* @since 1.0.0
8080
*/
8181
T withWebConfig();
82+
83+
/**
84+
* Ensures that when retrieving an Application, the Application's {@link Application#getSamlPolicy() samlPolicy}
85+
* is also retrieved in the same request. This enhances performance by leveraging a single request to retrieve multiple
86+
* related resources you know you will use.
87+
*
88+
* @return this instance for method chaining.
89+
* @since 1.3.0
90+
*/
91+
T withSamlPolicy();
8292
}

api/src/main/java/com/stormpath/sdk/phone/Phone.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public interface Phone extends Resource, Saveable, Deletable, Auditable {
5252

5353
/**
5454
* Sets the phone's name.
55-
* @param name he phone's name.
55+
* @param name the phone's name.
5656
*
5757
* @return this instance for method chaining.
5858
*/
@@ -67,7 +67,7 @@ public interface Phone extends Resource, Saveable, Deletable, Auditable {
6767

6868
/**
6969
* Sets the phone's description.
70-
* @param description he phone's description.
70+
* @param description the phone's description.
7171
*
7272
* @return this instance for method chaining.
7373
*/

api/src/main/java/com/stormpath/sdk/phone/Phones.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public static EqualsExpressionFactory verificationStatus() {
229229
* Phones.where(<b>Phones.createdAt()</b>.matches("[,2014-04-05T12:00:00]");
230230
* </pre>
231231
* The above example invokes the returned factory's <code>matches("[,2014-04-05T12:00:00]"))</code> method. This
232-
* produces a name-specific {@link Criterion} which is added to the criteria query (via the
232+
* produces a createdAt-specific {@link Criterion} which is added to the criteria query (via the
233233
* {@link #where(Criterion) where} method).
234234
* <pre>
235235
* For example, the following code is equivalent:
@@ -254,7 +254,7 @@ public static DateExpressionFactory createdAt(){
254254
* Phones.where(<b>Phones.modifiedAt()</b>.matches("[,2014-04-05T12:00:00]");
255255
* </pre>
256256
* The above example invokes the returned factory's <code>matches("[,2014-04-05T12:00:00]"))</code> method. This
257-
* produces a name-specific {@link Criterion} which is added to the criteria query (via the
257+
* produces a modifiedAt-specific {@link Criterion} which is added to the criteria query (via the
258258
* {@link #where(Criterion) where} method).
259259
* <pre>
260260
* For example, the following code is equivalent:
@@ -279,12 +279,12 @@ private static DateExpressionFactory newDateExpressionFactory(String propName) {
279279
}
280280

281281
/**
282-
* Creates a new {@link com.stormpath.sdk.phone.CreatePhoneRequestBuilder CreatePhoneRequestBuilder}
282+
* Creates a new {@link com.stormpath.sdk.phone.CreatePhoneRequestBuilder createPhoneRequestBuilder}
283283
* instance reflecting the specified {@link com.stormpath.sdk.phone.Phone} instance. The builder can be used to customize any
284284
* creation request options as necessary.
285285
*
286286
* @param phone the phone to create a new record for within Stormpath
287-
* @return a new {@link com.stormpath.sdk.phone.CreatePhoneRequestBuilder CreatePhoneRequestBuilder}
287+
* @return a new {@link com.stormpath.sdk.phone.CreatePhoneRequestBuilder createPhoneRequestBuilder}
288288
* instance reflecting the specified {@link com.stormpath.sdk.phone.Phone} instance.
289289
** @see com.stormpath.sdk.account.Account#createPhone(CreatePhoneRequest)
290290
*

api/src/main/java/com/stormpath/sdk/saml/AttributeStatementMappingRules.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
*/
1616
package com.stormpath.sdk.saml;
1717

18+
import com.stormpath.sdk.resource.Deletable;
1819
import com.stormpath.sdk.resource.Resource;
20+
import com.stormpath.sdk.resource.Saveable;
1921

20-
import java.util.Collection;
2122
import java.util.Set;
2223

2324
/**
@@ -31,7 +32,7 @@
3132
*
3233
* @since 1.0.RC8
3334
*/
34-
public interface AttributeStatementMappingRules extends Resource, Set<AttributeStatementMappingRule> {
35+
public interface AttributeStatementMappingRules extends Resource, Set<AttributeStatementMappingRule>, Saveable, Deletable{
3536

3637
/**
3738
* Removes the {@link AttributeStatementMappingRule}(s) identified by {@code ruleNames}.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.stormpath.sdk.saml;
2+
3+
import com.stormpath.sdk.application.Application;
4+
import com.stormpath.sdk.resource.Resource;
5+
6+
import java.util.Date;
7+
8+
/**
9+
* An AuthnVerification represents the successful results of verifying the signature of a SAML AuthnRequest targeted
10+
* against a particular Stormpath {@link Application}.
11+
*
12+
* @since 1.3.0
13+
*/
14+
public interface AuthnVerification extends Resource {
15+
16+
/**
17+
* Returns the relay state provided with the original SAML AuthnRequest, if any was provided. Otherwise the default
18+
* relay state configured for the {@link Application}.
19+
*
20+
* @return the relay state associated with the SAML AuthnRequest.
21+
*/
22+
String getRelayState();
23+
24+
/**
25+
* Returns the {@link RegisteredSamlServiceProvider} associated with the entityId of the original AuthnRequest.
26+
*
27+
* @return the {@link RegisteredSamlServiceProvider} associated with the entityId of the original AuthnRequest.
28+
*/
29+
RegisteredSamlServiceProvider getServiceProvider();
30+
31+
32+
/**
33+
* Returns the request ID provided with the original SAML AuthnRequest.
34+
*
35+
* @return the request ID provided with the original SAML AuthnRequest.
36+
*/
37+
String getRequestId();
38+
39+
40+
/**
41+
* Returns the issue instant of the original SAML AuthnRequest.
42+
*
43+
* @return the issue instant of the original SAML AuthnRequest.
44+
*/
45+
Date getAuthnIssueInstant();
46+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
package com.stormpath.sdk.saml;
2+
3+
import com.stormpath.sdk.resource.Resource;
4+
5+
/**
6+
* An AuthnVerificationRequest encapsulates the fields of a SAML AuthnRequest targeted
7+
* against a particular Stormpath Application.
8+
*
9+
* @since 1.3.0
10+
*/
11+
public interface AuthnVerificationRequest extends Resource {
12+
13+
/**
14+
* Returns the value of the SAMLRequest parameter provided with the incoming AuthnRequest.
15+
*
16+
* @return the value of the SAMLRequest parameter provided with the incoming AuthnRequest.
17+
*/
18+
String getSamlRequest();
19+
20+
/**
21+
* Sets the value of the SAMLRequest parameter provided with the incoming AuthnRequest.
22+
*
23+
* @param samlRequest the value of the SAMLRequest parameter from the incoming AuthnRequest.
24+
* @return this instance for method chaining.
25+
*/
26+
AuthnVerificationRequest setSamlRequest(String samlRequest);
27+
28+
/**
29+
* Returns the value of the RelayState parameter provided with the incoming AuthnRequest.
30+
*
31+
* @return the value of the RelayState parameter provided with the incoming AuthnRequest.
32+
*/
33+
String getRelayState();
34+
35+
/**
36+
* Sets the value of the RelayState parameter provided with the incoming AuthnRequest.
37+
*
38+
* @param relayState the value of the RelayState parameter from the incoming AuthnRequest.
39+
* @return this instance for method chaining.
40+
*/
41+
AuthnVerificationRequest setRelayState(String relayState);
42+
43+
/**
44+
* Returns the value of the SigAlg parameter provided with the incoming AuthnRequest.
45+
*
46+
* @return the value of the SigAlg parameter provided with the incoming AuthnRequest.
47+
*/
48+
String getSigAlg();
49+
50+
/**
51+
* Sets the value of the SigAlg parameter provided with the incoming AuthnRequest.
52+
*
53+
* @param sigAlg the value of the SigAlg parameter from the incoming AuthnRequest.
54+
* @return this instance for method chaining.
55+
*/
56+
AuthnVerificationRequest setSigAlg(String sigAlg);
57+
58+
/**
59+
* Returns the value of the Signature parameter provided with the incoming AuthnRequest.
60+
*
61+
* @return the value of the Signature parameter provided with the incoming AuthnRequest.
62+
*/
63+
String getSignature();
64+
65+
/**
66+
* Sets the value of the Signature parameter provided with the incoming AuthnRequest.
67+
*
68+
* @param signature the value of the Signature parameter from the incoming AuthnRequest.
69+
* @return this instance for method chaining.
70+
*/
71+
AuthnVerificationRequest setSignature(String signature);
72+
73+
/**
74+
* When the AuthnRequest is submitted via HTTP GET, returns the query string of the incoming request.
75+
* Otherwise null.
76+
*
77+
* @return the query string of the incoming AuthnRequest, or null if the AuthnRequest was submitted with HTTP POST.
78+
*/
79+
String getQueryString();
80+
81+
AuthnVerificationRequest setQueryString(String queryString);
82+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright 2016 Stormpath, Inc.
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+
package com.stormpath.sdk.saml;
17+
18+
19+
/**
20+
* Represents an attempt to create a new {@link RegisteredSamlServiceProvider} record in Stormpath.
21+
*
22+
* @see com.stormpath.sdk.tenant.Tenant#createRegisterdSamlServiceProvider(RegisteredSamlServiceProvider)
23+
* @since 1.3.0
24+
*/
25+
public interface CreateRegisteredSamlServiceProviderRequest {
26+
27+
/**
28+
* Returns the RegisteredSamlServiceProvider instance for which a new record will be created in Stormpath.
29+
*
30+
* @return the RegisteredSamlServiceProvider instance for which a new record will be created in Stormpath.
31+
*/
32+
RegisteredSamlServiceProvider getRegisteredSamlServiceProvider();
33+
34+
/**
35+
* Returns true in case RegisteredSamlServiceProvider has options.
36+
*
37+
* @return true in case RegisteredSamlServiceProvider has options.
38+
*/
39+
boolean hasRegisteredSamlServiceProviderOptions();
40+
41+
/**
42+
* Returns the {@link RegisteredSamlServiceProviderOptions}.
43+
*
44+
* @return {@link RegisteredSamlServiceProviderOptions}.
45+
*/
46+
RegisteredSamlServiceProviderOptions getRegisteredSamlServiceProviderOptions() throws IllegalStateException;
47+
48+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2016 Stormpath, Inc.
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+
package com.stormpath.sdk.saml;
17+
18+
/**
19+
* A Builder to construct {@link CreateRegisteredSamlServiceProviderRequest}s.
20+
*
21+
* @see com.stormpath.sdk.tenant.Tenant#createRegisterdSamlServiceProvider(RegisteredSamlServiceProvider)
22+
* @since 1.3.0
23+
*/
24+
public interface CreateRegisteredSamlServiceProviderRequestBuilder {
25+
26+
/**
27+
* Ensures that after a RegisteredSamlServiceProvider is created, the creation response is retrieved with the specified registeredSamlServiceProvider's
28+
* options. This enhances performance by leveraging a single request to retrieve multiple related
29+
* resources you know you will use.
30+
*
31+
* @return the builder instance for method chaining.
32+
* @throws IllegalArgumentException if {@code options} is null.
33+
*/
34+
CreateRegisteredSamlServiceProviderRequestBuilder withResponseOptions(RegisteredSamlServiceProviderOptions options) throws IllegalArgumentException;
35+
36+
/**
37+
* Creates a new {@code CreateRegisteredSamlServiceProviderRequest} instance based on the current builder state.
38+
*
39+
* @return a new {@code CreateRegisteredSamlServiceProviderRequest} instance based on the current builder state.
40+
*/
41+
CreateRegisteredSamlServiceProviderRequest build();
42+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
package com.stormpath.sdk.saml;
2+
3+
import com.stormpath.sdk.account.Account;
4+
import com.stormpath.sdk.resource.Resource;
5+
6+
import java.util.Date;
7+
8+
/**
9+
* A SamlResponseRequest encapsulates the information needed to prepare a SAML response according to the SAML specification.
10+
*
11+
* @since 1.3.0
12+
*/
13+
public interface CreateSamlResponseRequest extends Resource {
14+
15+
/**
16+
* Returns the {@link Account} to be represented in this SAML response.
17+
*
18+
* @return the {@link Account} to be represented in this SAML response.
19+
*/
20+
Account getAccount();
21+
22+
/**
23+
* Sets the {@link Account} to be represented in this SAML response.
24+
*
25+
* @param account the {@link Account} to be represented in this SAML response.
26+
* @return this instance for method chaining.
27+
*/
28+
CreateSamlResponseRequest setAccount(Account account);
29+
30+
/**
31+
* Returns the {@link RegisteredSamlServiceProvider} to be represented in this SAML response.
32+
*
33+
* @return the {@link RegisteredSamlServiceProvider} to be represented in this SAML response.
34+
*/
35+
RegisteredSamlServiceProvider getServiceProvider();
36+
37+
/**
38+
* Sets the {@link RegisteredSamlServiceProvider} to be represented in this SAML response.
39+
*
40+
* @param serviceProvider the {@link RegisteredSamlServiceProvider} to be represented in this SAML response.
41+
* @return this instance for method chaining.
42+
*/
43+
CreateSamlResponseRequest setServiceProvider(RegisteredSamlServiceProvider serviceProvider);
44+
45+
/**
46+
* Returns the request ID to be represented in this SAML response, which should match the request ID
47+
* that was provided in the initiating SAML AuthnRequest.
48+
*
49+
* @return the request ID to be represented in this SAML response.
50+
*/
51+
String getRequestId();
52+
53+
/**
54+
* Sets the request ID to be represented in this SAML response, which should match the request ID
55+
* that was provided in the initiating SAML AuthnRequest.
56+
*
57+
* @param requestId the request ID to be represented in this SAML response.
58+
* @return this instance for method chaining.
59+
*/
60+
CreateSamlResponseRequest setRequestId(String requestId);
61+
62+
/**
63+
* Returns the issue instant to be represented in this SAML response, which should match the issue instant
64+
* that was provided in the initiating SAML AuthnRequest.
65+
*
66+
* @return the issue instant to be represented in this SAML response.
67+
*/
68+
Date getAuthnIssueInstant();
69+
70+
/**
71+
* Sets the issue instant to be represented in this SAML response, which should match the issue instant
72+
* that was provided in the initiating SAML AuthnRequest.
73+
*
74+
* @param authnIssueInstant the issue instant to be represented in this SAML response.
75+
* @return this instance for method chaining.
76+
*/
77+
CreateSamlResponseRequest setAuthnIssueInstant(Date authnIssueInstant);
78+
}

0 commit comments

Comments
 (0)