Federated Identities is not about to be deprecated. We will be updating the docs. In the meantime, I can provide some stopgap instructions. In 2.4, the logins dictionary switched to a pull model. The SDK will ask you for an updated logins dictionary whenever the AWS credentials need to be refreshed. To use it, provide an implementation of AWSIdentityProviderManager to your credentials provider. Below is some partial code which shows you how to implement the logins method. It shows how to do it both synchronously if you have a current token and asynchronously if you have to call a service to get one.
Synchronously get the token
- (AWSTask<NSDictionary<NSString *, NSString *> *> *)logins {
return [AWSTask taskWithResult: @{ @"login.provider.com" : token}];
}
Asynchronously get the token
- (AWSTask<NSDictionary<NSString *, NSString *> *> *)logins {
AWSTaskCompletionSource<NSString*> *token = [AWSTaskCompletionSource new];
[self getOpenIdToken:token];
return [token.task continueWithSuccessBlock:^id _Nullable(AWSTask<NSString *> * _Nonnull task) {
return [AWSTask taskWithResult: @{ @"login.provider.com" : task.result }];
}];
}
- (void) getOpenIdToken: (AWSTaskCompletionSource <NSString*>*) token {
//call your server to get the token
//...
if(success){
token.result = oidcTokenFromServer;
}else {
[token setError:[NSError errorWithDomain:@"oidc"
code:-1
userInfo:@{@"error":@"Unable to get open id connect token"}]];
}
}