Codota Logo
IamPrincipal.getUserArn
Code IndexAdd Codota to your IDE (free)

How to use
getUserArn
method
in
com.jrestless.aws.security.IamPrincipal

Best Java code snippets using com.jrestless.aws.security.IamPrincipal.getUserArn (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: bbilger/jrestless

  /**
   * Returns {@link #getUserArn()}.
   *
   * @return name
   */
  @Override
  default String getName() {
    return getUserArn();
  }
}
origin: bbilger/jrestless

  @Test
  public void testNameReturnsCognitoIdentityId() {
    IamPrincipal principal = mock(IamPrincipal.class);
    when(principal.getName()).thenCallRealMethod();
    when(principal.getUserArn()).thenReturn("userArn");
    assertEquals("userArn", principal.getName());
  }
}
origin: bbilger/jrestless

private static void assertIamPrincipal(Principal principal) {
  IamPrincipal iamPrincipal = (IamPrincipal) principal;
  assertEquals(TEST_IAM_ACCESS_KEY, iamPrincipal.getAccessKey());
  assertEquals(TEST_IAM_USER, iamPrincipal.getUser());
  assertEquals(TEST_IAM_USER_ARN, iamPrincipal.getUserArn());
}
origin: bbilger/jrestless

@Test
public void createPrincipal_AccessKeyAndUserArnAndUserAndCallerGiven_ShouldCreateIamPrincipal() {
  GatewayRequest request = createRequestMock("accessKey", "userArn", "user", "caller");
  IamPrincipal principal = (IamPrincipal) createSecurityContextFactory(request).createPrincipal();
  assertEquals("accessKey", principal.getAccessKey());
  assertEquals("userArn", principal.getUserArn());
  assertEquals("user", principal.getUser());
  assertEquals("caller", principal.getCaller());
  assertEquals(principal.getUserArn(), principal.getName());
}
origin: bbilger/jrestless

@Test
public void createPrincipal_OnlyAccessKeyGiven_ShouldCreateIamPrincipal() {
  GatewayRequest request = createRequestMock("accessKey", null, null, null);
  IamPrincipal principal = (IamPrincipal) createSecurityContextFactory(request).createPrincipal();
  assertEquals("accessKey", principal.getAccessKey());
  assertNull(principal.getUserArn());
  assertNull(principal.getUser());
  assertNull(principal.getCaller());
  assertEquals(principal.getUserArn(), principal.getName());
}
com.jrestless.aws.securityIamPrincipalgetUserArn

Javadoc

Returns com.jrestless.aws.gateway.io.GatewayIdentity#getUserArn().

Popular methods of IamPrincipal

  • getName
    Returns #getUserArn().
  • getAccessKey
    Returns com.jrestless.aws.gateway.io.GatewayIdentity#getAccessKey().
  • getCaller
    Returns com.jrestless.aws.gateway.io.GatewayIdentity#getCaller().
  • getUser
    Returns com.jrestless.aws.gateway.io.GatewayIdentity#getUser().

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Menu (java.awt)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Notification (javax.management)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now