Skip to content

Commit

Permalink
chore: Add new identity protocols. (#594)
Browse files Browse the repository at this point in the history
* Add new identity protocols.

---------

Co-authored-by: Sichan Yoo <chanyoo@amazon.com>
  • Loading branch information
sichanyoo and Sichan Yoo authored Oct 4, 2023
1 parent 88529fe commit fb6ab10
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Sources/ClientRuntime/Identity/IdentityAPI/Identity.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

import Foundation

// Base protocol for all identity types
public protocol Identity {
var expiration: Date? { get }
}
15 changes: 15 additions & 0 deletions Sources/ClientRuntime/Identity/IdentityAPI/IdentityResolver.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

import Foundation

// Base protocol for all identity provider types
public protocol IdentityResolver {
associatedtype IdentityT: Identity

func getIdentity(identityProperties: Attributes?) async throws -> IdentityT
}

0 comments on commit fb6ab10

Please sign in to comment.