//ReedimTokenFromRedirectURI tries to reedim a token from the given redirect_uri
ReedimTokenFromRedirectURI tries to reedim a token from the given redirect_uri
// ReedimTokenFromRedirectURI tries to reedim a token from the given redirect_uri
func (vSelf *OfflineAuthHelper) ReedimTokenFromRedirectURI(pURI string) (vRisAuthenticationToken *AuthenticationToken, vRisError error) {
	vURI, vError := url.ParseRequestURI(pURI)
	if vError != nil {
		return newAuthenticationTokenError(vError), diagnostic.NewError("Error parsing request uri %s", vError, pURI)
	}
	vCode := vURI.Query().Get("code")
	if vCode == "" {
		vError := diagnostic.NewError("missing code parameter in uri %s ", nil, pURI)
		return newAuthenticationTokenError(vError), vError
	}
	vAuthenticationToken, vReedimError := reedimCode(vSelf.applicationInfo, vCode)
	if vReedimError != nil {
		vSelf.onAuthenticationError(vReedimError)
		return newAuthenticationTokenError(vReedimError), diagnostic.NewError("failed to reedim token", vReedimError)
	}
	vSelf.onAuthenticationToken(&vAuthenticationToken)
	return &vAuthenticationToken, nil
}
func ( vSelf * OfflineAuthHelper ) ReedimTokenFromRedirectURI ( pURI string ) ( vRisAuthenticationToken * AuthenticationToken , vRisError error ) { vURI , vError := url . ParseRequestURI ( pURI ) if vError != nil { return newAuthenticationTokenError ( vError ) , diagnostic . NewError ( " " , vError , pURI ) } vCode := vURI . Query ( ) . Get ( " " ) if vCode == " " { vError := diagnostic . NewError ( " " , nil , pURI ) return newAuthenticationTokenError ( vError ) , vError } vAuthenticationToken , vReedimError := reedimCode ( vSelf . applicationInfo , vCode ) if vReedimError != nil { vSelf . onAuthenticationError ( vReedimError ) return newAuthenticationTokenError ( vReedimError ) , diagnostic . NewError ( " " , vReedimError ) } vSelf . onAuthenticationToken ( & vAuthenticationToken ) return & vAuthenticationToken , nil }
ReedimTokenFromRedirectURI tries to reedim a token from the given redirect_uri
ReedimTokenFromRedirectURI tries to reedim a token from the given redirect_uri