AuthTokenFactory

public abstract class AuthTokenFactory extends Object

Provides authorization tokens for accessing the ridesharing provider's service account on RideEngine via gRPC. The factory ensures that there is always a valid access token available. The access token will have a remaining minimum lifetime of at least five minutes. That means that the access token factory must automatically renew expiring tokens. It shoud also minimize the number of token refreshes by re-using a token until its lifetime nears its end.

Public Constructor Summary

Public Method Summary

String
getTerminalPointServiceToken()
This method is deprecated. Instead, use getToken(int, AuthTokenContext)
String
getToken(int serviceType, AuthTokenContext context)
Returns the value for an "Authorization" HTTP request header for a gRPC call to the RideEngine.
String
getTripServiceToken(String tripId)
This method is deprecated. Instead, use getToken(int, AuthTokenContext)
String
getVehicleServiceToken()
This method is deprecated. Instead, use getToken(int, AuthTokenContext)

Inherited Method Summary

Public Constructors

public AuthTokenFactory ()

Public Methods

public String getTerminalPointServiceToken ()

This method is deprecated.
Instead, use getToken(int, AuthTokenContext)

public String getToken (int serviceType, AuthTokenContext context)

Returns the value for an "Authorization" HTTP request header for a gRPC call to the RideEngine.

Parameters
serviceType Type of FleetEngine service.
context Additional information used during auth token minting.

public String getTripServiceToken (String tripId)

This method is deprecated.
Instead, use getToken(int, AuthTokenContext)

public String getVehicleServiceToken ()

This method is deprecated.
Instead, use getToken(int, AuthTokenContext)