Skip to content

Commit

Permalink
Delete deprecated confidential.NewCredFromAssertion (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
chlowell authored Feb 15, 2023
1 parent 0af1c20 commit e83f3b9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions apps/confidential/confidential.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,6 @@ func NewCredFromSecret(secret string) (Credential, error) {
return Credential{secret: secret}, nil
}

// NewCredFromAssertion creates a Credential from a signed assertion.
//
// Deprecated: a Credential created by this function can't refresh the
// assertion when it expires. Use NewCredFromAssertionCallback instead.
func NewCredFromAssertion(assertion string) (Credential, error) {
if assertion == "" {
return Credential{}, errors.New("assertion can't be empty string")
}
return NewCredFromAssertionCallback(func(context.Context, AssertionRequestOptions) (string, error) { return assertion, nil }), nil
}

// NewCredFromAssertionCallback creates a Credential that invokes a callback to get assertions
// authenticating the application. The callback must be thread safe.
func NewCredFromAssertionCallback(callback func(context.Context, AssertionRequestOptions) (string, error)) Credential {
Expand Down

0 comments on commit e83f3b9

Please sign in to comment.