Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewTokenGroupAdder (0.19 sec)

  1. staging/src/k8s.io/apiserver/pkg/authentication/group/token_group_adder.go

    	Authenticator authenticator.Token
    	// Groups are additional groups to add to the user.Info from a successful authentication
    	Groups []string
    }
    
    // NewTokenGroupAdder wraps a token authenticator, and adds the specified groups to the returned user when authentication succeeds
    func NewTokenGroupAdder(auth authenticator.Token, groups []string) authenticator.Token {
    	return &TokenGroupAdder{auth, groups}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 11 20:04:50 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authentication/group/token_group_adder_test.go

    	capacity := make([]string, 0, 1024)
    	response := &authenticator.Response{User: &user.DefaultInfo{Name: "user", Groups: append(capacity, "original")}}
    	orig := toJson(response)
    
    	adder := authenticator.Token(
    		NewTokenGroupAdder(
    			authenticator.TokenFunc(func(ctx context.Context, token string) (*authenticator.Response, bool, error) {
    				return response, true, nil
    			}),
    			[]string{"added"},
    		),
    	)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 11 20:04:50 UTC 2022
    - 1.6K bytes
    - Viewed (0)
Back to top