Skip to content

Commit

Permalink
method names
Browse files Browse the repository at this point in the history
  • Loading branch information
malud authored and johakoch committed Feb 3, 2024
1 parent d2c788c commit c21e187
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions accesscontrol/introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (i *Introspector) Introspect(ctx context.Context, token string, exp, nbf in
}
}

introspectionData, err := i.requestIntrospection(ctx, token)
introspectionData, err := i.doRequestIntrospection(ctx, token)
if err != nil {
return nil, err
}
Expand All @@ -115,7 +115,7 @@ func (i *Introspector) Introspect(ctx context.Context, token string, exp, nbf in
}
}

ttl := i.getTtl(exp, nbf, introspectionData.Active())
ttl := i.getTTL(exp, nbf, introspectionData.Active())
// cache introspection data
i.memStore.Set(key, introspectionData, ttl)

Expand All @@ -142,7 +142,7 @@ func (i *Introspector) newIntrospectionRequest(ctx context.Context, token string
return req.WithContext(outCtx), cancel, nil
}

func (i *Introspector) requestIntrospection(ctx context.Context, token string) (IntrospectionResponse, error) {
func (i *Introspector) doRequestIntrospection(ctx context.Context, token string) (IntrospectionResponse, error) {
req, cancel, err := i.newIntrospectionRequest(ctx, token)
if err != nil {
return nil, err
Expand All @@ -163,7 +163,7 @@ func (i *Introspector) requestIntrospection(ctx context.Context, token string) (
return introspectionData, nil
}

func (i *Introspector) getTtl(exp, nbf int64, active bool) int64 {
func (i *Introspector) getTTL(exp, nbf int64, active bool) int64 {
ttl := i.conf.TTLSeconds

if exp > 0 {
Expand Down

0 comments on commit c21e187

Please sign in to comment.