Home / Function/ isValidToken68() — fiber Function Reference

isValidToken68() — fiber Function Reference

Architecture documentation for the isValidToken68() function in extractors.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  06f0b6b5_35c9_7752_bd0f_5104cd1998e0["isValidToken68()"]
  9369d97d_10d6_c835_81b9_8542715b2822["extractors.go"]
  06f0b6b5_35c9_7752_bd0f_5104cd1998e0 -->|defined in| 9369d97d_10d6_c835_81b9_8542715b2822
  53248ffc_cf9c_4161_f81e_49826d27b3ab["FromAuthHeader()"]
  53248ffc_cf9c_4161_f81e_49826d27b3ab -->|calls| 06f0b6b5_35c9_7752_bd0f_5104cd1998e0
  style 06f0b6b5_35c9_7752_bd0f_5104cd1998e0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

extractors/extractors.go lines 506–531

func isValidToken68(token string) bool {
	if token == "" {
		return false
	}
	paddingStarted := false
	for i := 0; i < len(token); i++ {
		c := token[i]
		switch {
		case (c >= 'A' && c <= 'Z') ||
			(c >= 'a' && c <= 'z') ||
			(c >= '0' && c <= '9') ||
			c == '-' || c == '.' || c == '_' || c == '~' || c == '+' || c == '/':
			if paddingStarted {
				return false // No characters allowed after padding starts
			}
		case c == '=':
			if i == 0 {
				return false // Cannot start with padding
			}
			paddingStarted = true
		default:
			return false // Invalid character
		}
	}
	return true
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does isValidToken68() do?
isValidToken68() is a function in the fiber codebase, defined in extractors/extractors.go.
Where is isValidToken68() defined?
isValidToken68() is defined in extractors/extractors.go at line 506.
What calls isValidToken68()?
isValidToken68() is called by 1 function(s): FromAuthHeader.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free