All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.amazon.lambda.http.CustomPrincipal Maven / Gradle / Ivy

package io.quarkus.amazon.lambda.http;

import java.security.Principal;
import java.util.Map;

/**
 * Allocated when a custom authorizer (i.e. Lambda) is used to authenticate user
 *
 * Will only be allocated if requestContext.authorizer.principalId is set
 * in the http event sent by API Gateway
 *
 */
public class CustomPrincipal implements Principal {
    private String name;
    private Map claims;

    public CustomPrincipal(String name, Map claims) {
        this.claims = claims;
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    public Map getClaims() {
        return claims;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy