-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MobileClient] Add developer authenticated identities to federatedSig…
…nIn fixes #577
- Loading branch information
Showing
3 changed files
with
230 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...d-sdk-mobile-client/src/main/java/com/amazonaws/mobile/client/FederatedSignInOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.amazonaws.mobile.client; | ||
|
||
public class FederatedSignInOptions { | ||
|
||
private final Builder builder; | ||
|
||
FederatedSignInOptions(final Builder builder) { | ||
this.builder = builder; | ||
} | ||
|
||
public String getCustomRoleARN() { | ||
return builder.customRoleARN; | ||
} | ||
|
||
public String getIdentityId() { | ||
return builder.identityId; | ||
} | ||
|
||
/** | ||
* Start creating a SignOutOptions object with this builder. | ||
* | ||
* @return a Builder used to specify options | ||
*/ | ||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
private String customRoleARN; | ||
private String identityId; | ||
|
||
public Builder() { } | ||
|
||
public Builder identityId(final String identityId) { | ||
this.identityId = identityId; | ||
return this; | ||
} | ||
|
||
public Builder customRoleARN(final String customRoleARN) { | ||
this.customRoleARN = customRoleARN; | ||
return this; | ||
} | ||
|
||
/** | ||
* Finalize the Builder and the options object will be returned. | ||
* | ||
* @return the options object containing the options specified | ||
*/ | ||
public FederatedSignInOptions build() { | ||
return new FederatedSignInOptions(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters