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

Commit 00f618f

Browse files
committed
Base classes to get a head start on MFA
1 parent fa31635 commit 00f618f

File tree

18 files changed

+559
-1
lines changed

18 files changed

+559
-1
lines changed

api/src/main/java/com/stormpath/sdk/account/Account.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.stormpath.sdk.group.GroupMembershipList;
3131
import com.stormpath.sdk.oauth.AccessTokenList;
3232
import com.stormpath.sdk.oauth.RefreshTokenList;
33+
import com.stormpath.sdk.phone.Phone;
3334
import com.stormpath.sdk.provider.ProviderData;
3435
import com.stormpath.sdk.resource.Auditable;
3536
import com.stormpath.sdk.resource.Deletable;
@@ -560,4 +561,6 @@ public interface Account extends Resource, Saveable, Deletable, Extendable, Audi
560561
* @since 1.0.RC7
561562
*/
562563
RefreshTokenList getRefreshTokens();
564+
565+
Phone createPhone(Phone phone);
563566
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2015 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.challenge;
17+
18+
/**
19+
* TODO: description
20+
*/
21+
public interface Challenge {
22+
23+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright 2015 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.factor;
17+
18+
import com.stormpath.sdk.account.Account;
19+
20+
/**
21+
* TODO: description
22+
*/
23+
public abstract class Factor {
24+
private FactorType factorType;
25+
private Account account;
26+
27+
public Factor(FactorType factorType, Account account) {
28+
this.factorType = factorType;
29+
this.account = account;
30+
}
31+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2013 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.factor;
17+
18+
/**
19+
* TODO: description
20+
*/
21+
public enum FactorType {
22+
SMS
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2015 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.factor.sms;
17+
18+
/**
19+
* TODO: description
20+
*/
21+
public interface SmsFactor {
22+
23+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright 2015 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.factor.sms;
17+
18+
import com.stormpath.sdk.account.Account;
19+
import com.stormpath.sdk.phone.Phone;
20+
21+
/**
22+
* TODO: description
23+
*/
24+
public interface SmsFactorBuilder {
25+
26+
SmsFactorBuilder setPhone(Phone phone);
27+
SmsFactorBuilder setAccount(Account account);
28+
SmsFactorBuilder setChallengeMessage(String message);
29+
30+
SmsFactor build();
31+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2015 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.phone;
17+
18+
import com.stormpath.sdk.resource.Deletable;
19+
import com.stormpath.sdk.resource.Resource;
20+
21+
/**
22+
* TODO: description
23+
*/
24+
public interface Phone extends Resource, Deletable {
25+
26+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2015 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.phone;
17+
18+
import com.stormpath.sdk.account.Account;
19+
20+
/**
21+
* TODO: description
22+
*/
23+
public interface PhoneBuilder {
24+
25+
PhoneBuilder setNumber(String number);
26+
PhoneBuilder setName(String name);
27+
PhoneBuilder setDescription(String description);
28+
PhoneBuilder setPhoneStatus(PhoneStatus phoneStatus);
29+
PhoneBuilder setPhoneVerificationStatus(PhoneVerificationStatus phoneVerificationStatus);
30+
PhoneBuilder setAccount(Account account);
31+
32+
Phone build();
33+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2015 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.phone;
17+
18+
import com.stormpath.sdk.resource.CollectionResource;
19+
20+
/**
21+
* TODO: description
22+
*/
23+
public interface PhoneList extends CollectionResource<Phone> {
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2013 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.phone;
17+
18+
/**
19+
* TODO: description
20+
*/
21+
public enum PhoneStatus {
22+
ENABLED, DISABLED
23+
}

0 commit comments

Comments
 (0)