Function bodies 2,478 total
Auth class · ruby · L26-L254 (229 LOC)lib/magi/archive/mcp/auth.rb
class Auth
# Authentication error raised when token operations fail
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fAuth class · ruby · L26-L254 (229 LOC)lib/magi/archive/mcp/auth.rb
class Auth
# Authentication error raised when token operations fail
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fAuth class · ruby · L26-L254 (229 LOC)lib/magi/archive/mcp/auth.rb
class Auth
# Authentication error raised when token operations fail
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fAuth class · ruby · L26-L254 (229 LOC)lib/magi/archive/mcp/auth.rb
class Auth
# Authentication error raised when token operations fail
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fAuth class · ruby · L26-L254 (229 LOC)lib/magi/archive/mcp/auth.rb
class Auth
# Authentication error raised when token operations fail
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fAuth class · ruby · L26-L254 (229 LOC)lib/magi/archive/mcp/auth.rb
class Auth
# Authentication error raised when token operations fail
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fAuth class · ruby · L26-L254 (229 LOC)lib/magi/archive/mcp/auth.rb
class Auth
# Authentication error raised when token operations fail
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fMethodology: Repobility · https://repobility.com/research/state-of-ai-code-2026/
AuthenticationError class · ruby · L28-L253 (226 LOC)lib/magi/archive/mcp/auth.rb
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_toAuthenticationError class · ruby · L28-L253 (226 LOC)lib/magi/archive/mcp/auth.rb
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_toAuthenticationError class · ruby · L28-L253 (226 LOC)lib/magi/archive/mcp/auth.rb
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_toAuthenticationError class · ruby · L28-L253 (226 LOC)lib/magi/archive/mcp/auth.rb
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_toAuthenticationError class · ruby · L28-L253 (226 LOC)lib/magi/archive/mcp/auth.rb
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_toAuthenticationError class · ruby · L28-L253 (226 LOC)lib/magi/archive/mcp/auth.rb
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_toAuthenticationError class · ruby · L28-L253 (226 LOC)lib/magi/archive/mcp/auth.rb
class AuthenticationError < StandardError; end
# Token verification error
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_toVerificationError class · ruby · L31-L203 (173 LOC)lib/magi/archive/mcp/auth.rb
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#Open data scored by Repobility · https://repobility.com
VerificationError class · ruby · L31-L203 (173 LOC)lib/magi/archive/mcp/auth.rb
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#VerificationError class · ruby · L31-L203 (173 LOC)lib/magi/archive/mcp/auth.rb
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#VerificationError class · ruby · L31-L203 (173 LOC)lib/magi/archive/mcp/auth.rb
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#VerificationError class · ruby · L31-L203 (173 LOC)lib/magi/archive/mcp/auth.rb
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#VerificationError class · ruby · L31-L203 (173 LOC)lib/magi/archive/mcp/auth.rb
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#VerificationError class · ruby · L31-L203 (173 LOC)lib/magi/archive/mcp/auth.rb
class VerificationError < StandardError; end
# JWKS fetch error
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#JWKSError class · ruby · L34-L101 (68 LOC)lib/magi/archive/mcp/auth.rb
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#
# @return [Boolean] true if token exists and not expired
def tokJWKSError class · ruby · L34-L101 (68 LOC)lib/magi/archive/mcp/auth.rb
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#
# @return [Boolean] true if token exists and not expired
def tokSame scanner, your repo: https://repobility.com — Repobility
JWKSError class · ruby · L34-L101 (68 LOC)lib/magi/archive/mcp/auth.rb
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#
# @return [Boolean] true if token exists and not expired
def tokJWKSError class · ruby · L34-L101 (68 LOC)lib/magi/archive/mcp/auth.rb
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#
# @return [Boolean] true if token exists and not expired
def tokJWKSError class · ruby · L34-L101 (68 LOC)lib/magi/archive/mcp/auth.rb
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#
# @return [Boolean] true if token exists and not expired
def tokJWKSError class · ruby · L34-L101 (68 LOC)lib/magi/archive/mcp/auth.rb
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#
# @return [Boolean] true if token exists and not expired
def tokJWKSError class · ruby · L34-L101 (68 LOC)lib/magi/archive/mcp/auth.rb
class JWKSError < StandardError; end
# Refresh buffer: refresh token this many seconds before expiry
REFRESH_BUFFER_SECONDS = 300
attr_reader :config, :username, :resolved_role
# Initialize auth handler with configuration
#
# @param config [Config] the configuration object
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
end
# Get current valid token, fetching new one if needed
#
# @return [String] the JWT token
# @raise [AuthenticationError] if token fetch fails
def token
return @token if token_valid?
fetch_token
@token
end
# Check if current token is still valid
#
# @return [Boolean] true if token exists and not expired
def tokinitialize method · ruby · L44-L52 (9 LOC)lib/magi/archive/mcp/auth.rb
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
endinitialize method · ruby · L44-L52 (9 LOC)lib/magi/archive/mcp/auth.rb
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
endinitialize method · ruby · L44-L52 (9 LOC)lib/magi/archive/mcp/auth.rb
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
endRepobility — the code-quality scanner for AI-generated software · https://repobility.com
initialize method · ruby · L44-L52 (9 LOC)lib/magi/archive/mcp/auth.rb
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
endinitialize method · ruby · L44-L52 (9 LOC)lib/magi/archive/mcp/auth.rb
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
endinitialize method · ruby · L44-L52 (9 LOC)lib/magi/archive/mcp/auth.rb
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
endinitialize method · ruby · L44-L52 (9 LOC)lib/magi/archive/mcp/auth.rb
def initialize(config)
@config = config
@token = nil
@token_expires_at = nil
@username = nil
@resolved_role = nil
@jwks_cache = nil
@jwks_cached_at = nil
endtoken method · ruby · L58-L63 (6 LOC)lib/magi/archive/mcp/auth.rb
def token
return @token if token_valid?
fetch_token
@token
endtoken method · ruby · L58-L63 (6 LOC)lib/magi/archive/mcp/auth.rb
def token
return @token if token_valid?
fetch_token
@token
endtoken method · ruby · L58-L63 (6 LOC)lib/magi/archive/mcp/auth.rb
def token
return @token if token_valid?
fetch_token
@token
endtoken method · ruby · L58-L63 (6 LOC)lib/magi/archive/mcp/auth.rb
def token
return @token if token_valid?
fetch_token
@token
endMethodology: Repobility · https://repobility.com/research/state-of-ai-code-2026/
token method · ruby · L58-L63 (6 LOC)lib/magi/archive/mcp/auth.rb
def token
return @token if token_valid?
fetch_token
@token
endtoken method · ruby · L58-L63 (6 LOC)lib/magi/archive/mcp/auth.rb
def token
return @token if token_valid?
fetch_token
@token
endtoken method · ruby · L58-L63 (6 LOC)lib/magi/archive/mcp/auth.rb
def token
return @token if token_valid?
fetch_token
@token
endtoken_valid? method · ruby · L68-L72 (5 LOC)lib/magi/archive/mcp/auth.rb
def token_valid?
return false if @token.nil? || @token_expires_at.nil?
Time.now < (@token_expires_at - REFRESH_BUFFER_SECONDS)
endtoken_valid? method · ruby · L68-L72 (5 LOC)lib/magi/archive/mcp/auth.rb
def token_valid?
return false if @token.nil? || @token_expires_at.nil?
Time.now < (@token_expires_at - REFRESH_BUFFER_SECONDS)
endtoken_valid? method · ruby · L68-L72 (5 LOC)lib/magi/archive/mcp/auth.rb
def token_valid?
return false if @token.nil? || @token_expires_at.nil?
Time.now < (@token_expires_at - REFRESH_BUFFER_SECONDS)
endtoken_valid? method · ruby · L68-L72 (5 LOC)lib/magi/archive/mcp/auth.rb
def token_valid?
return false if @token.nil? || @token_expires_at.nil?
Time.now < (@token_expires_at - REFRESH_BUFFER_SECONDS)
endtoken_valid? method · ruby · L68-L72 (5 LOC)lib/magi/archive/mcp/auth.rb
def token_valid?
return false if @token.nil? || @token_expires_at.nil?
Time.now < (@token_expires_at - REFRESH_BUFFER_SECONDS)
endOpen data scored by Repobility · https://repobility.com
token_valid? method · ruby · L68-L72 (5 LOC)lib/magi/archive/mcp/auth.rb
def token_valid?
return false if @token.nil? || @token_expires_at.nil?
Time.now < (@token_expires_at - REFRESH_BUFFER_SECONDS)
endtoken_valid? method · ruby · L68-L72 (5 LOC)lib/magi/archive/mcp/auth.rb
def token_valid?
return false if @token.nil? || @token_expires_at.nil?
Time.now < (@token_expires_at - REFRESH_BUFFER_SECONDS)
endfetch_jwks method · ruby · L79-L90 (12 LOC)lib/magi/archive/mcp/auth.rb
def fetch_jwks(force: false)
return @jwks_cache if jwks_cache_valid? && !force
url = config.url_for("/.well-known/jwks.json")
http_client = configure_ssl(HTTP)
response = http_client.get(url)
unless response.status.success?
raise JWKSError,
"JWKS fetch failed: HTTP #{response.code}"
endpage 1 / 50next ›