amazon-archives / aws-serverless-auth-reference-app

Serverless reference app and backend API, showcasing authentication and authorization patterns using Amazon Cognito, Amazon API Gateway, AWS Lambda, and AWS IAM.
Other
754 stars 193 forks source link

Could you provide some sample Java code for Cognito UserPool Authorizer client #52

Open sysout opened 6 years ago

sysout commented 6 years ago

This is from the generated java SDK

import com.amazonaws.ImmutableRequest;

import spacefinder.auth.SpacefinderUserPoolAuthorizer;

public class SpacefinderUserPoolAuthorizerImpl implements SpacefinderUserPoolAuthorizer {

    @Override
    public String generateToken(ImmutableRequest<?> request) {
        return "some-generated-auth-token";
    }
}

Obviously, there is a big gap between "some-generated-auth-token" and a working Authorizer client. We want to use Cognito User Pools + Cognito Federated Identities + Amazon API Gateway to create an API for third party developers. I really appreciate the help.