Skip to content

Improve Guardian section#39

Merged
lbalmaceda merged 5 commits intoauth0:masterfrom
nikolaseu:chore-improve-guardian-section
Mar 14, 2017
Merged

Improve Guardian section#39
lbalmaceda merged 5 commits intoauth0:masterfrom
nikolaseu:chore-improve-guardian-section

Conversation

@nikolaseu
Copy link
Copy Markdown
Contributor

No description provided.

provider.setAuthToken("atokEn");
provider.setFrom("+12356789");
provider.setMessagingServiceSID("id321");
provider.setSID("id123");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still test that the deprecated methods behave as we expect.

provider.setAWSAccessKeyId("akey");
provider.setAWSSecretAccessKey("secretakey");
provider.setSNSAPNSPlatformApplicationARN("arn1");
provider.setSNSGCMPlatformApplicationARN("arn2");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still test that the deprecated methods behave as we expect.

@JsonProperty("messaging_service_sid")
public void setMessagingServiceSID(String messagingServiceSID) {
public void setMessagingServiceSID(String messagingServiceSID) throws IllegalArgumentException {
if (from != null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the user is removing the messagingServiceSID i.e. setting messagingServiceSID=null then the exception will be thrown anyway. The check should be:

if (from!=null && messagingServiceSID!=null){
    //.. 
}

@JsonProperty("from")
public void setFrom(String from) {
public void setFrom(String from) throws IllegalArgumentException {
if (messagingServiceSID != null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the user is removing the from i.e. setting from=null then the exception will be thrown anyway. The check should be:

if (from!=null && messagingServiceSID!=null){
    //.. 
}

@hzalaz hzalaz modified the milestone: v1-Next Mar 14, 2017
@lbalmaceda lbalmaceda merged commit 6e5a73b into auth0:master Mar 14, 2017
@nikolaseu nikolaseu deleted the chore-improve-guardian-section branch March 15, 2017 21:47
@lbalmaceda lbalmaceda modified the milestones: v1-Next, 1.1.0 May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants