Scopes returns the scopes stored in ctx
(ctx context.Context)
| 161 | |
| 162 | // Scopes returns the scopes stored in ctx |
| 163 | func Scopes(ctx context.Context) []string { |
| 164 | tok, _ := security.GetTokenFromContext(ctx) |
| 165 | oauth2token, ok := tok.(*token) |
| 166 | if !ok { |
| 167 | return []string{} |
| 168 | } |
| 169 | return oauth2token.scope.toSlice() |
| 170 | } |
| 171 | |
| 172 | func AddScope(ctx context.Context, scope string) context.Context { |
| 173 | tok, _ := security.GetTokenFromContext(ctx) |
searching dependent graphs…