Questions tagged «micronaut-aws»

1
从Cognito身份池IdentityId获取Cognito用户池用户名
我正在将AWS Congito用户池用于具有该用户池作为身份提供者的Cognito身份池的账户管理。我正在使用它来控制通过将请求发送到Lambda的API网关对API的访问。我的Lambda是使用Micronaut在Java 8中实现的。所有这些都工作正常。 在lambda,我是从得到的名称Principal在HttpRequest: protected String resolveUser( HttpRequest request ){ String ret = null; Optional<Principal> principal = request.getUserPrincipal(); if( principal.isPresent() ){ ret = principal.get().getName(); } if( ret == null || ret.length() == 0 ){ ret = "unknown"; } return ret; } Cognito identityId的字符串名称中返回的内容。像这样: 我们东部-1:xxxxe650-53f4-4cba-b553-5dff42bexxxx 我想记录实际的用户登录名,或者至少需要某种方式在需要时将identityId转换为登录名。 该LookupDeveloperIdentity API调用似乎是去了解这个正确的方式,但我无法得到它的工作。 尝试使用Java和AWS Java SDK …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.